Skip to content

Commit

Permalink
Adds model test project and a test for TileBuilder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Richardson committed Dec 13, 2017
1 parent 2b02596 commit 9b2e06c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Sharparsonne.Models.Tests/Sharparsonne.Models.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Sharpasonne.Models\Sharpasonne.Models.csproj" />
</ItemGroup>

</Project>
19 changes: 19 additions & 0 deletions Sharparsonne.Models.Tests/TileBuilderTests.cs
Original file line number Diff line number Diff line change
@@ -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<IFeature>());

Assert.True(maybeTile.HasValue);
}
}
}
6 changes: 6 additions & 0 deletions Sharpasonne.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9b2e06c

Please sign in to comment.