java.lang.Object
com.marginallyclever.nodegraphcore.TestGraphCore

public class TestNodeGraphCore
extends java.lang.Object
Test the NodeGraphCore elements.
Since:
2022-02-21
  • Constructor Details

    • TestNodeGraphCore

      public TestNodeGraphCore()
  • Method Details

    • beforeAll

      @BeforeAll public static void beforeAll()
      setup the NodeGraph to use.
    • beforeEach

      @BeforeEach public void beforeEach()
      clear the graph.
    • testSaveEmptyGraph

      @Test public void testSaveEmptyGraph()
      Test that empty graph look as expected.
    • testAdd

      @Test public void testAdd()
      confirm Add.update() works as expected and sets itself to not dirty
    • testAddTwoConstants

      @Test public void testAddTwoConstants()
      confirm adding two constants together via NodeConnections works as expected
    • testAddTwoConstantsAndReport

      @Test public void testAddTwoConstantsAndReport()
      confirm adding two constants together via NodeConnections works as expected. confirm PrintToStdOut works as expected.
    • testFactoryFailsOnBadRequests

      @Test public void testFactoryFailsOnBadRequests()
      confirm factory will assert if asked for a node that doesn't exist. confirm that there is no node with name "" or null.
    • testFactoryCreatesAllDefaultTypes

      @Test public void testFactoryCreatesAllDefaultTypes()
      confirm factory can create all registered nodes.
    • testNodesAreNotEqual

      @Test public void testNodesAreNotEqual()
      confirm two different nodes are not somehow equal when serialized. confirm two nodes of the same type in the same graph are not equal when serialized.
    • testAllNodesToJSONAndBack

      @Test public void testAllNodesToJSONAndBack()
      confirm all Nodes can be created by the NodeFactory. confirm all Nodes can be serialized and de-serialized. confirm all Nodes are identical after being serialized and de-serialized.
    • testModelToJSONAndBack

      @Test public void testModelToJSONAndBack()
      confirm a NodeGraph can be serialized and de-serialized.
    • testModelClears

      @Test public void testModelClears()
      confirm clearing a NodeGraph really does set it back to nothing.
    • testFactoryWontRegisterTwoNodesWithSameName

      @Test public void testFactoryWontRegisterTwoNodesWithSameName()
      confirm registering an already registered node throws an exception.
    • testNodeVariablesToJSONAndBack

      @Test public void testNodeVariablesToJSONAndBack() throws java.lang.Exception
      Test NodeVariable serialization
      Throws:
      java.lang.Exception - if serialization fails.
    • testAddTwoModelsTogether

      @Test public void testAddTwoModelsTogether()
      Test that two models can be added together