mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
Add separate project for tests
This commit is contained in:
parent
3eec127eff
commit
b556848479
@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.31424.327
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuildedRose", "GuildedRose\GuildedRose.csproj", "{D781C52B-92C0-48BF-8414-177495DF4174}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuildedRoseTests", "GuildedRoseTests\GuildedRoseTests.csproj", "{CB6715CE-A283-4C70-9C1B-F58822077731}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -15,6 +17,10 @@ Global
|
||||
{D781C52B-92C0-48BF-8414-177495DF4174}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D781C52B-92C0-48BF-8414-177495DF4174}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D781C52B-92C0-48BF-8414-177495DF4174}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CB6715CE-A283-4C70-9C1B-F58822077731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CB6715CE-A283-4C70-9C1B-F58822077731}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CB6715CE-A283-4C70-9C1B-F58822077731}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CB6715CE-A283-4C70-9C1B-F58822077731}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -6,10 +6,4 @@
|
||||
<StartupObject>GuildedRose.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ApprovalTests" Version="5.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -4,8 +4,9 @@ using System.IO;
|
||||
using System.Text;
|
||||
using ApprovalTests;
|
||||
using ApprovalTests.Reporters;
|
||||
|
||||
namespace GuildedRose
|
||||
using GuildedRose;
|
||||
|
||||
namespace GuildedRoseTests
|
||||
{
|
||||
[UseReporter(typeof(DiffReporter))]
|
||||
public class ApprovalTest
|
||||
@ -1,17 +1,18 @@
|
||||
using Xunit;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GuildedRose
|
||||
{
|
||||
public class GildedRoseTest
|
||||
{
|
||||
[Fact]
|
||||
public void foo()
|
||||
{
|
||||
IList<Item> Items = new List<Item> { new Item { Name = "foo", SellIn = 0, Quality = 0 } };
|
||||
GildedRose app = new GildedRose(Items);
|
||||
app.UpdateQuality();
|
||||
Assert.Equal("fixme", Items[0].Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
using Xunit;
|
||||
using System.Collections.Generic;
|
||||
using GuildedRose;
|
||||
|
||||
namespace GuildedRoseTests
|
||||
{
|
||||
public class GildedRoseTest
|
||||
{
|
||||
[Fact]
|
||||
public void foo()
|
||||
{
|
||||
IList<Item> Items = new List<Item> { new Item { Name = "foo", SellIn = 0, Quality = 0 } };
|
||||
GildedRose app = new GildedRose(Items);
|
||||
app.UpdateQuality();
|
||||
Assert.Equal("fixme", Items[0].Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
20
csharpcore/GuildedRoseTests/GuildedRoseTests.csproj
Normal file
20
csharpcore/GuildedRoseTests/GuildedRoseTests.csproj
Normal file
@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ApprovalTests" Version="5.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GuildedRose\GuildedRose.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in New Issue
Block a user