33import org .ironchefpython .modapi .*;
44
55import org .junit .Test ;
6- import org .mockengine .DynamicComponent ;
7- import org .mockengine .DynamicComponent .Getter ;
8- import org .mockengine .DynamicComponent .Constructor ;
9- import org .mockengine .DynamicEntitySystemFactory ;
10- import org .mockengine .DynamicSystem ;
116
127
138
@@ -28,28 +23,28 @@ public void mockTest() throws Exception {
2823 mm .runScript (HealthTest .class .getResourceAsStream ("health.js" ), "health.js" );
2924
3025 // Create a factory that turns prototypes into Terasology Classes
31- DynamicEntitySystemFactory componentFactory = new DynamicEntitySystemFactory (mm );
32-
33- // Create the HealthComponent class
34- Class <? extends DynamicComponent > HealthComponent = componentFactory .getComponent ("Health" );
35-
36- // Create a Constructor object that makes a new HealthComponent
37- Constructor ctr = new Constructor (HealthComponent , Number .class , Number .class , Number .class );
38-
39- // Create a new HealthComponent instance
40- DynamicComponent o = ctr .newInstance (1 ,2 ,3 );
41-
42- // Create a getter for a HealthComponent property
43- Getter getRatio = o .new Getter (HealthComponent , "ratio" );
44-
45- // Get the value for the property "ratio" on the instance o
46- Number ratio = (Number ) getRatio .get (o );
47-
48- System .out .println (ratio );
49-
50-
51- DynamicSystem healthSystem = componentFactory .getSystem ("Health" );
52-
26+ // DynamicEntitySystemFactory componentFactory = new DynamicEntitySystemFactory(mm);
27+ //
28+ // // Create the HealthComponent class
29+ // Class<? extends DynamicComponent> HealthComponent = componentFactory.getComponent("Health");
30+ //
31+ // // Create a Constructor object that makes a new HealthComponent
32+ // Constructor ctr = new Constructor(HealthComponent, Number.class, Number.class, Number.class);
33+ //
34+ // // Create a new HealthComponent instance
35+ // DynamicComponent o = ctr.newInstance(1,2,3);
36+ //
37+ // // Create a getter for a HealthComponent property
38+ // Getter getRatio = o.new Getter(HealthComponent, "ratio");
39+ //
40+ // // Get the value for the property "ratio" on the instance o
41+ // Number ratio = (Number) getRatio.get(o);
42+ //
43+ // System.out.println(ratio);
44+ //
45+ //
46+ // DynamicSystem healthSystem = componentFactory.getSystem("Health");
47+ //
5348 }
5449
5550}
0 commit comments