Example #1
0
        public void Contains_IdNull_ThrowsArgumentNullException()
        {
            // arrange
            ModelMain testModelMain = new ModelMain();

            // act
            testModelMain.Contains(null);
        }
Example #2
0
        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.");
        }
Example #3
0
        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.");
        }