private void Testing(CopyEnum copyEnum) { try { testPath = ReaderWriter.ReaderWriter.CreateTestFile(testsDictionary[copyEnum]); reader = new ReaderWriter.ReaderGraph(testPath, false); graph = reader.ReadFile(); stringBuilder.AppendLine(copyEnum.ToString()); stringBuilder.AppendLine("Graph created."); stringBuilder.AppendLine(graph.ToString()); IGraphInterface graphCopy = GraphOperation.CopyGraph(graph); stringBuilder.AppendLine("Copied graph."); stringBuilder.AppendLine(graphCopy.ToString()); } catch (KeyNotFoundException) { throw new MyException.TestsException.TestsMissingTestException(copyEnum.ToString()); } catch (MyException.ReaderWriterException.ReaderWriterException e) { stringBuilder.AppendLine(e.Message); } }
/// <summary> /// Test a particular enum (file) /// </summary> /// <param name="copyEnum">enum (file)</param> /// <returns>report</returns> public StringBuilder Test(CopyEnum copyEnum) { stringBuilder.Clear(); Testing(copyEnum); return(stringBuilder); }