public void GetTransitionsWithoutFollowersTest() { Model.PetriNet.PetriNet testNet = new Model.PetriNet.PetriNet("TestNet"); Transition testTransition1 = testNet.AddTransition("TestTransition1"); Transition testTransition2 = testNet.AddTransition("TestTransition2"); Transition testTransition3 = testNet.AddTransition("TestTransition3"); testNet.AddTransition("TestTransition4"); testTransition1.AddOutgoingPlace(new Place()); testTransition2.AddOutgoingPlace(new Place()); List <Transition> testList = testNet.GetTransitionsWithoutFollowers(); Assert.IsNotNull(testList); Assert.AreEqual(testTransition3, testList.First()); Assert.AreEqual(2, testList.Count); }
public void GetTransitionsWithoutFollowersTest() { Model.PetriNet.PetriNet testNet = new Model.PetriNet.PetriNet("TestNet"); Transition testTransition1 = testNet.AddTransition("TestTransition1"); Transition testTransition2 = testNet.AddTransition("TestTransition2"); Transition testTransition3 = testNet.AddTransition("TestTransition3"); testNet.AddTransition("TestTransition4"); testTransition1.AddOutgoingPlace(new Place()); testTransition2.AddOutgoingPlace(new Place()); List<Transition> testList = testNet.GetTransitionsWithoutFollowers(); Assert.IsNotNull(testList); Assert.AreEqual(testTransition3, testList.First()); Assert.AreEqual(2, testList.Count); }