#!/usr/bin/env python
import coral as coral
from coral.modeler.getFQName import *
L = coral.Language.__getLanguage__("UML", 1, 4)

m = L.getElement("Model")()
c = L.getElement("Class")()
c.namespace = m
m.name = "mymodel"
c.name = "myclass"

s = getFQName(c)
assert s == "mymodel::myclass"

s = getFQName(c, 1)
assert s == "myclass"
