From 9b2e06ce5984fa10bb7297378b64a6fcd6ab94eb Mon Sep 17 00:00:00 2001 From: Lee Richardson Date: Wed, 13 Dec 2017 21:24:05 +0000 Subject: [PATCH] Adds model test project and a test for TileBuilder. --- .../Sharparsonne.Models.Tests.csproj | 16 ++++++++++++++++ Sharparsonne.Models.Tests/TileBuilderTests.cs | 19 +++++++++++++++++++ Sharpasonne.sln | 6 ++++++ 3 files changed, 41 insertions(+) create mode 100644 Sharparsonne.Models.Tests/Sharparsonne.Models.Tests.csproj create mode 100644 Sharparsonne.Models.Tests/TileBuilderTests.cs diff --git a/Sharparsonne.Models.Tests/Sharparsonne.Models.Tests.csproj b/Sharparsonne.Models.Tests/Sharparsonne.Models.Tests.csproj new file mode 100644 index 0000000..908231b --- /dev/null +++ b/Sharparsonne.Models.Tests/Sharparsonne.Models.Tests.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.0 + + + + + + + + + + + + diff --git a/Sharparsonne.Models.Tests/TileBuilderTests.cs b/Sharparsonne.Models.Tests/TileBuilderTests.cs new file mode 100644 index 0000000..4163f18 --- /dev/null +++ b/Sharparsonne.Models.Tests/TileBuilderTests.cs @@ -0,0 +1,19 @@ +using System.Linq; +using Sharpasonne; +using Sharpasonne.Models; +using Xunit; + +namespace Sharparsonne.Models.Tests +{ + public class TileBuilderTests + { + [Fact] + void When_CreatingEmptyTile_Then_ReturnsSome() + { + var maybeTile = new TileBuilder() + .CreateTile(Enumerable.Empty()); + + Assert.True(maybeTile.HasValue); + } + } +} diff --git a/Sharpasonne.sln b/Sharpasonne.sln index 3662d7c..0ef1f9b 100644 --- a/Sharpasonne.sln +++ b/Sharpasonne.sln @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sharpasonne.Tests", "Sharpa EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sharpasonne.Models", "Sharpasonne.Models\Sharpasonne.Models.csproj", "{D02FF6B4-1CAA-4FE8-B196-D77DAB9C2D2C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sharparsonne.Models.Tests", "Sharparsonne.Models.Tests\Sharparsonne.Models.Tests.csproj", "{64B6A130-3074-49E6-AF96-11246F82175C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {D02FF6B4-1CAA-4FE8-B196-D77DAB9C2D2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {D02FF6B4-1CAA-4FE8-B196-D77DAB9C2D2C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D02FF6B4-1CAA-4FE8-B196-D77DAB9C2D2C}.Release|Any CPU.Build.0 = Release|Any CPU + {64B6A130-3074-49E6-AF96-11246F82175C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64B6A130-3074-49E6-AF96-11246F82175C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64B6A130-3074-49E6-AF96-11246F82175C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64B6A130-3074-49E6-AF96-11246F82175C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE