public void StaticState_TestingDataReads_CorrectValues() { // Arrange the static state object to test. StaticState s = HardCodedStateCreator.CreateTestStaticStateFromHardCode(); // Test that it's working correctly. HardCodedStateCreator.CheckTestStaticState(s); }
public void DynamicState_ReadNodeData_ReturnsCorrectInformation() { DynamicState d = null; for (int i = 0; i < 1; i++) { d = HardCodedStateCreator.CreateTestDynamicState(); } for (int i = 0; i < 1; i++) { HardCodedStateCreator.CheckTestDynamicState(d); } }
public void DefaultContactPointCalculator_RunOnHardCodedStaticState_ReturnsCorrectGroups() { StaticState s = HardCodedStateCreator.CreateTestStaticStateFromHardCode(); var reader = s.ContactPointGroupsReader(); IContactPointCalculator calculator = new DefaultContactPointCalculator(); CollectionAssert.AreEquivalent(new HashSet <HashSet <int> > { new HashSet <int> { 1 }, new HashSet <int> { 3 } }, reader(0)); CollectionAssert.AreEquivalent(new HashSet <HashSet <int> > { new HashSet <int> { 5 }, new HashSet <int> { 0 } }, reader(1)); CollectionAssert.AreEquivalent(new HashSet <HashSet <int> > { new HashSet <int> { 1 }, new HashSet <int> { 5 } }, reader(2)); CollectionAssert.AreEquivalent(new HashSet <HashSet <int> > { new HashSet <int> { 6 } }, reader(8)); CollectionAssert.AreEquivalent(new HashSet <HashSet <int> > { new HashSet <int> { 5 } }, reader(6)); }
public void DynamicState_UpdateConstructor_SuccessfullyUpdates() { // Set up the initial Dynamic State. DynamicState original = HardCodedStateCreator.CreateTestDynamicState(); // Assert that the default test passes to begin with.. (just in case..) HardCodedStateCreator.CheckTestDynamicState(original); // Create the 'change' data, and create a new DynamicState object which contains those changes. DynamicState modified = new DynamicState(original, GenerateFactChangeData()); // Assert that the original state object is unchanged. HardCodedStateCreator.CheckTestDynamicState(original); // Assert that the new state object is set up correctly, containing the changes and the copied-state from the original. TestModifiedDynamicState(modified); }
public void DynamicState_ReadNodeSetData_ReturnsCorrectInformation() { DynamicState d = HardCodedStateCreator.CreateTestDynamicState(); HardCodedStateCreator.CheckTestDynamicStateNodeSets(d); }