Changeset 145 for trunk/src/unit_tests


Ignore:
Timestamp:
11/22/09 18:16:47 (15 years ago)
Author:
lgiessmann
Message:

added the support for reification in the xtm 2.0 importer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/unit_tests/reification_test.lisp

    r144 r145  
    9797                                       :xtm-id xtm-id-1
    9898                                       :start-revision revision-1))
     99            (assoc-type (make-construct 'TopicC
     100                                        :psis (list (make-instance 'PersistentIdC
     101                                                                   :uri "psi-assoc-type"
     102                                                                   :start-revision revision-1))
     103                                       :topicid "assoc-type"
     104                                       :xtm-id xtm-id-1
     105                                       :start-revision revision-1))
     106            (role-type (make-construct 'TopicC
     107                                       :psis (list (make-instance 'PersistentIdC
     108                                                                  :uri "psi-role-type"
     109                                                                  :start-revision revision-1))
     110                                       :topicid "assoc-type"
     111                                       :xtm-id xtm-id-1
     112                                       :start-revision revision-1))
    99113            (occurrence-type (make-construct 'TopicC
    100114                                       :psis (list (make-instance 'PersistentIdC
     
    144158                                         :instance-of topic-2
    145159                                         :charvalue "test-name"
    146                                          :start-revision revision-2)))
    147           (is (= (length (elephant:get-instances-by-class 'TopicC)) 6))
     160                                         :start-revision revision-2))
     161              (assoc (make-construct 'AssociationC
     162                                     :item-identifiers nil
     163                                     :instance-of assoc-type
     164                                     :themes nil
     165                                     :roles
     166                                     (list
     167                                      (list :instance-of role-type
     168                                            :player topic-1
     169                                            :item-identifiers
     170                                            (list (make-instance 'ItemIdentifierC
     171                                                                 :uri "role-1"
     172                                                                 :start-revision revision-1)))
     173                                      (list :instance-of role-type
     174                                            :player topic-2
     175                                            :item-identifiers
     176                                            (list (make-instance 'ItemIdentifierC
     177                                                                 :uri "role-2"
     178                                                                 :start-revision revision-1))))
     179                                     :start-revision revision-1)))
     180          (is (= (length (elephant:get-instances-by-class 'TopicC)) 8))
    148181          (datamodel::merge-reifier-topics topic-1 topic-2)
    149           (is (= (length (elephant:get-instances-by-class 'TopicC)) 5))
     182          (is (= (length (elephant:get-instances-by-class 'TopicC)) 7))
    150183          (is (= (length (union (list ii-1-1 ii-1-2 ii-2-1 ii-2-2)
    151184                                (item-identifiers topic-1)))
     
    169202                                (list test-name)))
    170203                 (length (list test-name))))
    171           ;;TODO: roleplayer, topicmap
     204          (is (eql (player (first (roles assoc))) topic-1))
     205          (is (eql (player (second (roles assoc))) topic-1))
    172206          ;;TODO: check all objects and their version-infos
    173207          (elephant:close-store))))))
     208
     209
     210;;TODO: check xtm1.0 importer
     211;;TODO: check xtm2.0 importer
     212;;TODO: check rdf importer
     213;;TODO: check fragment exporter
    174214
    175215
Note: See TracChangeset for help on using the changeset viewer.