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