Beispiel #1
0
        public void AlphaMinerBuildTheNetTest()
        {
            Field field = new Field {
                EventLog = GenerateTestLog()
            };

            AlphaMiner    alphaMiner = new AlphaMiner(field);
            PrivateObject priObj     = new PrivateObject(alphaMiner);

            priObj.Invoke("DetectAllPlaces");
            priObj.Invoke("DetectStartAndEndActivitiesInTraces");
            priObj.Invoke("AddsPlacesTogether");
            priObj.Invoke("RemoveAllDuplicatePlaces");
            priObj.Invoke("BuildTheNet");

            PetriNet petriNet   = (PetriNet)priObj.GetField("_petriNet");
            Place    startPlace = petriNet.GetPlaceByName("start");
            Place    endPlace   = petriNet.GetPlaceByName("end");

            Assert.IsNotNull(petriNet);
            Assert.IsNotNull(startPlace);
            Assert.IsNotNull(endPlace);

            //MiningAlgorithm.AlphaMiner.PetriNet = new PetriNet("");

            //MiningAlgorithm.AlphaMiner.ListOfStartActivities.Add("A");
            //MiningAlgorithm.AlphaMiner.ListOfEndActivities.Add("D");

            //MiningAlgorithm.AlphaMiner.ListOfActivities.Add("A");
            //MiningAlgorithm.AlphaMiner.ListOfActivities.Add("B");
            //MiningAlgorithm.AlphaMiner.ListOfActivities.Add("C");
            //MiningAlgorithm.AlphaMiner.ListOfActivities.Add("D");
            //MiningAlgorithm.AlphaMiner.ListOfActivities.Add("E");

            //MiningAlgorithm.AlphaMiner.ListOfAlphaPlaces = ListAlphaMinerPlaces;

            //MiningAlgorithm.AlphaMiner.BuildTheNet();
        }