#!/usr/bin/env python
import qt

from coral.modeler.property.propertyeditor import AssociationListE
import coral
metamodel=coral.lang.UML14
s=coral.Project()

app=qt.QApplication([])
c=metamodel.Class()
c.__setProject__(s)

property=c.__type__().getPropertyByName("feature")
o=metamodel.Operation()
dlg=AssociationListE(None,property,c,None)
dlg.show()
dlg.add(o)

assert (c.feature[0]==o)

dlg.deleteAll()

assert (len(c.feature)==0)
