From 1ae572346ee229aab233811082eb9a66eb8eb80a Mon Sep 17 00:00:00 2001 From: Trent Date: Sat, 5 Sep 2020 07:30:50 +0800 Subject: [PATCH] Added interface to allow for testing --- .gitignore | 4 +++- NAoCHelper.sln | 22 ++++++++++++++++++++++ Solution/IPuzzle.cs | 9 +++++++++ Solution/Puzzle.cs | 2 +- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 NAoCHelper.sln create mode 100644 Solution/IPuzzle.cs diff --git a/.gitignore b/.gitignore index dd8bb54..259de16 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ **/obj/* packages/ **/.vs/* -**/lcov.info \ No newline at end of file +**/lcov.info +/.idea/* +*.DotSettings.user diff --git a/NAoCHelper.sln b/NAoCHelper.sln new file mode 100644 index 0000000..6f2be4c --- /dev/null +++ b/NAoCHelper.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NAoCHelper", "Solution\NAoCHelper.csproj", "{A7BEC492-3BA4-460C-B457-78FC1F28D475}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NAoCHelperTests", "Tests\NAoCHelperTests.csproj", "{6F9E0AA6-57DE-4038-8EB7-E14E75DCA4D1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A7BEC492-3BA4-460C-B457-78FC1F28D475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7BEC492-3BA4-460C-B457-78FC1F28D475}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7BEC492-3BA4-460C-B457-78FC1F28D475}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7BEC492-3BA4-460C-B457-78FC1F28D475}.Release|Any CPU.Build.0 = Release|Any CPU + {6F9E0AA6-57DE-4038-8EB7-E14E75DCA4D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F9E0AA6-57DE-4038-8EB7-E14E75DCA4D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F9E0AA6-57DE-4038-8EB7-E14E75DCA4D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F9E0AA6-57DE-4038-8EB7-E14E75DCA4D1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Solution/IPuzzle.cs b/Solution/IPuzzle.cs new file mode 100644 index 0000000..928630c --- /dev/null +++ b/Solution/IPuzzle.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace NAoCHelper +{ + public interface IPuzzle + { + Task GetInputAsync(); + } +} \ No newline at end of file diff --git a/Solution/Puzzle.cs b/Solution/Puzzle.cs index 4865f5c..400662a 100644 --- a/Solution/Puzzle.cs +++ b/Solution/Puzzle.cs @@ -5,7 +5,7 @@ namespace NAoCHelper { - public class Puzzle + public class Puzzle : IPuzzle { public int Year { get; } public int Day { get; }