예제 #1
0
        public int FillGraph()
        {
            Console.WriteLine("\nFillGraph() Test:\n---------------------------------------------");

            int TryOld = EvalueTest <EvalueBEC> .TryCollectData(testPathOld, ref localOldFile, 1, true);

            int TryNew = EvalueTest <EvalueBEC> .TryCollectData(testPathNew, ref localNewFile, 2, true);

            stat = new Statistic(localOldFile, localNewFile);
            List <StatisticProperty> statList = stat.BuildStats();

            Graph graph = new Graph(statList);

            graph.FillGraph();

            List <string> graphString = graph.BuildOutputString();

            foreach (string line in graphString)
            {
                Console.WriteLine(line);
            }

            Console.WriteLine("---------------------------------------------\n");
            return(0);
        }
예제 #2
0
        public int GetEjendom()
        {
            Console.WriteLine("\n GetEjendom() test:\n---------------------------------------------");

            EvalueTest <EvalueBEC> .TryCollectData(testPathOld, ref localOldFile, 1, true);

            // It just uses the storeproperty on its own List anyway,
            // might as well use the EvalueStorage class.
            // Right now we're checking for a KeyNotFound.
            Evalue fest = localNewFile.GetProperty(localOldFile.Evalues[0].KomNr,
                                                   localOldFile.Evalues[0].EjdNr);

            Console.WriteLine("Fest == null: {0}\n", fest == null);

            // Fill the actual table
            EvalueTest <EvalueBEC> .TryCollectData(testPathNew, ref localNewFile, 2, true);

            fest = localNewFile.GetProperty(localOldFile.Evalues[0].KomNr,
                                            localOldFile.Evalues[0].EjdNr);

            Console.WriteLine(fest);

            Console.WriteLine("---------------------------------------------\n");

            return(0);
        }
예제 #3
0
        // We want to see if each property has a distinct KomNr and EjdNr
        public int UniqueTest()
        {
            int TryOld = EvalueTest <EvalueBEC> .TryCollectData(testPathOld, ref localOldFile, 1, true);

            Console.WriteLine("\nUniqueTest() Test:\n---------------------------------------------");

            Console.WriteLine("Test if lengths match: {0}: {1}",
                              localOldFile.Length(), 0 < localOldFile.Length());

            Console.WriteLine("---------------------------------------------\n");
            return(0);
        }
예제 #4
0
        public int BuildStats()
        {
            Console.WriteLine("\nBuildStats() Test:\n---------------------------------------------");

            int TryOld = EvalueTest <EvalueBEC> .TryCollectData(testPathOld, ref localOldFile, 1, true);

            int TryNew = EvalueTest <EvalueBEC> .TryCollectData(testPathNew, ref localNewFile, 2, true);

            stat = new Statistic(localOldFile, localNewFile);
            List <StatisticProperty> statList = stat.BuildStats();

            // Test for evaluenew = 0. By new rules, this should be empty
            IEnumerable <StatisticProperty> NoEvalueNews = statList.Where(ejd => ejd.EvalueNew == 0);

            foreach (StatisticProperty sp in NoEvalueNews)
            {
                Console.WriteLine(sp.ToCsv());
            }

            Console.WriteLine("---------------------------------------------\n");
            return(0);
        }