private void Testing(LargestFirstSequenceEnum largestFirstSequence) { try { testPath = ReaderWriter.ReaderWriter.CreateTestFile(testsDictionary[largestFirstSequence]); reader = new ReaderWriter.ReaderGraph(testPath, false); graph = reader.ReadFile(); LargestFirstSequence largestFirstSequenceAlgorithm = new LargestFirstSequence(graph); largestFirstSequenceAlgorithm.Color(); stringBuilder.AppendLine(largestFirstSequence.ToString()); stringBuilder.AppendLine("Graph colored."); stringBuilder.AppendLine(graph.GetColoredGraph().ToString()); } catch (KeyNotFoundException) { throw new MyException.TestsException.TestsMissingTestException(largestFirstSequence.ToString()); } catch (MyException.ReaderWriterException.ReaderWriterException e) { stringBuilder.AppendLine(e.Message); } }
/// <summary> /// Test a particular enum (file) /// </summary> /// <param name="largestFirstSequence">enum (file)</param> /// <returns>report</returns> public StringBuilder Test(LargestFirstSequenceEnum largestFirstSequence) { stringBuilder.Clear(); Testing(largestFirstSequence); return(stringBuilder); }