public void Contains_IdOfNode_ReturnsTrue() { // arrange SetUpBasicFactoryDummies(); ModelMain testModelMain = new ModelMain(); testModelMain.AddTransition(0, 0, "transId"); testModelMain.AddPlace(0, 0, "placeId"); testModelMain.AddArc("transId", "placeId", "arcId"); // act bool result = testModelMain.Contains("transId"); // assert Assert.IsTrue(result, "Should return true if id belongs to existent Node."); }
public void Contains_NonExistentId_ReturnsFalse() { // arrange SetUpBasicFactoryDummies(); ModelMain testModelMain = new ModelMain(); testModelMain.AddTransition(0, 0, "transId"); testModelMain.AddPlace(0, 0, "placeId"); testModelMain.AddArc("transId", "placeId", "arcId"); // act bool result = testModelMain.Contains("NonExistentId"); // assert Assert.IsFalse(result, "Should return false if element with id does not exist."); }
public void IsNode_IdOfArc_ReturnsFalse() { // arrange SetUpBasicFactoryDummies(); ModelMain testModelMain = new ModelMain(); testModelMain.AddTransition(0, 0, "transId"); testModelMain.AddPlace(0, 0, "placeId"); testModelMain.AddArc("transId", "placeId", "arcId"); // act bool result = testModelMain.IsNode("arcId"); // assert Assert.IsFalse(result, "Should return false if id belongs to Arc."); }
public void IsNode_NonExistentId_ReturnsFalse() { // arrange SetUpBasicFactoryDummies(); ModelMain testModelMain = new ModelMain(); testModelMain.AddTransition(0, 0, "transId"); testModelMain.AddPlace(0, 0, "placeId"); testModelMain.AddArc("transId", "placeId", "arcId"); // act bool result = testModelMain.IsNode("NonExistentId"); // assert Assert.IsFalse(result, "Should return false if id is non-existent."); }