@@ -54,7 +54,10 @@ public void beforeEach() {
5454 @ Test
5555 public void testSaveEmptyGraph () {
5656 var json = graph .toJSON ();
57- assertEquals ("{\" nodes\" :[],\" connections\" :[]}" ,
57+ json .put ("uniqueID" ,"19781eb0-4009-4f5e-bc68-4e70de1b5181" );
58+ assertEquals ("{\" variables\" :[],\" nodes\" :[],\" name\" :\" Graph\" ,"
59+ +"\" rectangle\" :{\" x\" :0,\" width\" :150,\" y\" :0,\" height\" :50},"
60+ +"\" label\" :\" \" ,\" uniqueID\" :\" 19781eb0-4009-4f5e-bc68-4e70de1b5181\" ,\" connections\" :[]}" ,
5861 json .toString ());
5962 }
6063
@@ -158,7 +161,7 @@ public void testAllNodesToJSONAndBack() {
158161 * confirm a {@link Graph} can be serialized and de-serialized.
159162 */
160163 @ Test
161- public void testModelToJSONAndBack () {
164+ public void testGraphToJSONAndBack () {
162165 buildAddTwoConstants ();
163166 JSONObject a = graph .toJSON ();
164167 Graph modelB = new Graph ();
@@ -170,7 +173,7 @@ public void testModelToJSONAndBack() {
170173 * confirm clearing a {@link Graph} really does set it back to nothing.
171174 */
172175 @ Test
173- public void testModelClears () {
176+ public void testGraphClears () {
174177 buildAddTwoConstants ();
175178 graph .clear ();
176179 assertEquals ((new Graph ()).toString (), graph .toString ());
@@ -180,8 +183,8 @@ public void testModelClears() {
180183 * confirm registering an already registered node does not throw an exception and does not double-register.
181184 */
182185 @ Test
183- public void testFactoryWontRegisterTwoNodesWithSameName () throws Exception {
184- assertThrows (GraphException .class ,()-> NodeFactory . loadRegistries () );
186+ public void testFactoryWontRegisterTwoNodesWithSameName () {
187+ assertThrows (GraphException .class , NodeFactory :: loadRegistries );
185188 }
186189
187190 /**
@@ -192,7 +195,7 @@ public void testFactoryWontRegisterTwoNodesWithSameName() throws Exception {
192195 * @param <T>
193196 * @throws Exception
194197 */
195- private <T > void testNodeVariableToJSONAndBack (Class <T > myClass ,T instA ,T instB ) throws Exception {
198+ private <T > void testNodeVariableToJSONAndBack (Class <T > myClass ,T instA ,T instB ) {
196199 Port <?> a = new Input <>(myClass .getSimpleName (),myClass ,instA );
197200 Port <?> b = new Input <>(myClass .getSimpleName (),myClass ,instB );
198201
@@ -214,7 +217,7 @@ private <T> void testNodeVariableToJSONAndBack(Class<T> myClass,T instA,T instB)
214217 * @throws Exception if serialization fails.
215218 */
216219 @ Test
217- public void testNodeVariablesToJSONAndBack () throws Exception {
220+ public void testNodeVariablesToJSONAndBack () {
218221 /* removed: it's not possible to serialize back to abstract classes
219222 testNodeVariableToJSONAndBack(Object.class, new Object(),new Object());
220223 testNodeVariableToJSONAndBack(Number.class, 1.2,0.0);
@@ -234,7 +237,7 @@ public void testNodeVariablesToJSONAndBack() throws Exception {
234237 * </ul>
235238 */
236239 @ Test
237- public void testAddTwoModelsTogether () {
240+ public void testAddTwoGraphsTogether () {
238241 buildAddTwoConstants ();
239242
240243 ThreadPoolScheduler scheduler = new ThreadPoolScheduler ();
@@ -260,6 +263,8 @@ public void testAddTwoModelsTogether() {
260263 modelB .add (new Connection (a0 ,2 ,m ,0 ));
261264 modelB .add (new Connection (a1 ,2 ,m ,1 ));
262265
266+ // TODO and input and output ports.
267+
263268 // submit all the Adds to the scheduler
264269 int count = 0 ;
265270 for (Node n : modelB .getNodes ()) {
0 commit comments