#!/usr/bin/env python
from coral.modeler import modeler,action
import os

m=modeler.ModelerWindow()

# create a project with 3 models
storage=action.newProject(["UML",1,5])
action.newModel(storage,["ESMD",1,0])
action.newModel(storage,["FSM",1,0])
action.saveProjectAs("tmp/temp.xml", "2.0")

# the storage should have 3 roots
s=action.openProject("tmp/temp.xml")

assert s
print s," with ",len(s.contents()),"roots"
assert(len(s.contents())==3)
