NetworkImpl b = new NetworkImpl();
b.setName("b");
myNetwork.addNode(b);
NEFEnsembleFactoryImpl ef = new NEFEnsembleFactoryImpl();
NEFEnsembleImpl c = (NEFEnsembleImpl)ef.make("c", 10, 1);
b.addNode(c);
b.getSimulator().addProbe("c", "X", true);
b.exposeOrigin(c.getOrigin("X"), "exposed");
if(!b.getExposedOriginName(c.getOrigin("X")).equals("exposed"))
fail("Origin not exposed correctly");
if(myNetwork.getNode("b") == null)
fail("Network not added");
myNetwork.removeNode("b");
try
{
myNetwork.getNode("b");
fail("Network not removed");
}
catch(StructuralException se)
{
}
try
{
b.getNode("c");
fail("Ensemble not recursively removed from network");
}
catch(StructuralException se)
{
}
if(b.getSimulator().getProbes().length != 0)
fail("Probes not removed correctly");
if(b.getExposedOriginName(c.getOrigin("X")) != null)
fail("Origin not unexposed correctly");
}