Browse Source

changed two method names in FileImporter to start with uppercase and fixed a reported warning in UnitTest1

Vincenz Mechler 5 years ago
parent
commit
8a9ffdb153

+ 1 - 1
SketchAssistant/SketchAssistant.Tests/UnitTest1.cs

@@ -349,7 +349,7 @@ namespace Tests
                 (int, int, List<Line>) values1 = uut.ParseISADInputForTesting(file);
                 program.CreateCanvasAndSetPictureForTesting(values1.Item1, values1.Item2, values1.Item3);
             }
-            catch(FileImporterException ex)
+            catch(FileImporterException)
             {
                 //save the occurence of an exception
                 exceptionThrown = true;

+ 4 - 4
SketchAssistant/SketchAssistant/FileImporter.cs

@@ -52,8 +52,8 @@ namespace SketchAssistant
                 throw new FileImporterException("unterminated drawing definition", ".isad files have to end with the 'enddrawing' token", allLines.Length);
             }
 
-            (int, int) dimensions = parseISADHeader(allLines);
-            List<Line> picture = parseISADBody(allLines, dimensions.Item1, dimensions.Item2);
+            (int, int) dimensions = ParseISADHeader(allLines);
+            List<Line> picture = ParseISADBody(allLines, dimensions.Item1, dimensions.Item2);
 
             return (dimensions.Item1, dimensions.Item2, picture);
         }
@@ -65,7 +65,7 @@ namespace SketchAssistant
         /// </summary>
         /// <param name="allLines">the input file as an array of lines</param>
         /// <returns>the width and height of the left canvas</returns>
-        private (int, int) parseISADHeader(String[] allLines)
+        private (int, int) ParseISADHeader(String[] allLines)
         {
             int width;
             int height;
@@ -84,7 +84,7 @@ namespace SketchAssistant
         /// </summary>
         /// <param name="allLines">the input file as an array of lines</param>
         /// <returns>the parsed picture as a list of lines</returns>
-        private List<Line> parseISADBody(String[] allLines, int width, int height)
+        private List<Line> ParseISADBody(String[] allLines, int width, int height)
         {
 
             String lineStartString = "line";