Search in sources :

Example 1 with PortableCommandWrapper

use of cbit.vcell.simdata.PortableCommandWrapper in project vcell by virtualcell.

the class PortableCommandWrapperTest method unset.

@Test(expected = IllegalStateException.class)
public void unset() {
    PortableCommandWrapper empty = new PortableCommandWrapper();
    System.err.println(empty.asJson() + ", should not print!");
}
Also used : PortableCommandWrapper(cbit.vcell.simdata.PortableCommandWrapper) Test(org.junit.Test)

Example 2 with PortableCommandWrapper

use of cbit.vcell.simdata.PortableCommandWrapper in project vcell by virtualcell.

the class PortableCommandWrapperTest method badPackage.

@Test(expected = IllegalArgumentException.class)
public void badPackage() {
    @SuppressWarnings("unused") PortableCommandWrapper shell = new PortableCommandWrapper(null);
    System.err.println("should not print!");
}
Also used : PortableCommandWrapper(cbit.vcell.simdata.PortableCommandWrapper) Test(org.junit.Test)

Example 3 with PortableCommandWrapper

use of cbit.vcell.simdata.PortableCommandWrapper in project vcell by virtualcell.

the class PortableCommandWrapperTest method store.

@Test
public void store() throws IOException {
    String json = null;
    {
        SumPortableCommandTestClass c = new SumPortableCommandTestClass(2, 3);
        PortableCommandWrapper shell = new PortableCommandWrapper(c);
        json = shell.asJson();
        // System.out.println(json);
        c.execute();
    }
    PortableCommand c2 = PortableCommandWrapper.fromJson(json);
    c2.execute();
}
Also used : PortableCommand(cbit.vcell.simdata.PortableCommand) PortableCommandWrapper(cbit.vcell.simdata.PortableCommandWrapper) Test(org.junit.Test)

Aggregations

PortableCommandWrapper (cbit.vcell.simdata.PortableCommandWrapper)3 Test (org.junit.Test)3 PortableCommand (cbit.vcell.simdata.PortableCommand)1