Exemplo n.º 1
0
 public void FullCoverageTreeShouldBeBuild(string file)
 {
     var petriNet = PetriNet.Parse(file);
     var treeBuilder = new FullCoverageTreeBuilder(petriNet);
     var tree = treeBuilder.Build();
     /*Assert.IsTrue(tree.Root.Child.Count == 2);
     Assert.IsTrue(tree.Root.Child[0].Child.Count == 2);
     Assert.IsTrue(tree.Root.Child[1].Child == null);
     Assert.IsTrue(tree.Root.Child[0].Child[0].Child == null);
     Assert.IsTrue(tree.Root.Child[0].Child[1].Child.Count == 1);*/
 }
Exemplo n.º 2
0
 public void FullCoverageTreeShouldBeBuildCorrectly()
 {
     var petriNet = PetriNet.Parse("Files\\petri_net_741.txt");
     var treeBuilder = new FullCoverageTreeBuilder(petriNet);
     var tree = treeBuilder.Build();
     Assert.IsTrue(tree.Root.Child.Count == 2);
     Assert.IsTrue(tree.Root.ChildTransitions.Count == 2);
     Assert.IsTrue(tree.Root.Child[0].Child.Count == 2);
     Assert.IsTrue(tree.Root.Child[0].ChildTransitions.Count == 2);
     Assert.IsTrue(tree.Root.Child[1].Child == null);
     Assert.IsTrue(tree.Root.Child[0].Child[0].Child == null);
     Assert.IsTrue(tree.Root.Child[0].Child[1].Child.Count == 1);
     Assert.IsTrue(tree.Root.Child[0].Child[1].ChildTransitions.Count == 1);
 }
Exemplo n.º 3
0
 public PropertiesChecker(PetriNet petriNet)
 {
     _petriNet = petriNet;
     _coverageTreeBuilder = new CoverageTreeBuilder(_petriNet);
     _fullCoverageTreeBuilder  = new FullCoverageTreeBuilder(_petriNet);
 }