#!/usr/bin/env python
#
# Simple test that makes sure XMIid is set
#
import coral
L = coral.lang.UML14

m = L.Model()
c1 = L.Class()
c1.namespace = m
c2 = coral.ModelCopy_One(c1)

assert c2.__XMIid__() != c1.__XMIid__()

c2.namespace = None

m2 = coral.ModelCopy_One(m, coral.MODELCOPY_DONT_CREATE_NEW_UUIDS)

assert m.__XMIid__() == m2.__XMIid__()


