#!/usr/bin/env python
#
# This test is very important
# It tries to check that hrefs inside an XMI file is
# relative to the place where the XMI file was found, not
# the current working directory, or the directory where the test file
# is.
#
#
import coral ; UML14=coral.lang.UML14 
m = coral.loadModel("../../modeler/unittests/remote_file_1.xmi")
assert(m)
owned = m.ownedElement
assert(owned.size() == 1)
c = owned[0]

assert(c.oclIsKindOf(UML14.Class))
o = c.instance[0]

print o
print o.classifier
assert(o.classifier.size() == 1)
assert(o.classifier[0] == c)
assert(c.instance.size() == 1)
assert(c.instance[0] == o)


