mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
Merge pull request #252 from un1r8okq/separate-test-project
Restructure .NET Core solution to follow best practice
This commit is contained in:
commit
617f1748cd
31
csharpcore/GildedRose.sln
Normal file
31
csharpcore/GildedRose.sln
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.31424.327
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GildedRose", "GildedRose\GildedRose.csproj", "{D781C52B-92C0-48BF-8414-177495DF4174}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GildedRoseTests", "GildedRoseTests\GildedRoseTests.csproj", "{CB6715CE-A283-4C70-9C1B-F58822077731}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D781C52B-92C0-48BF-8414-177495DF4174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{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
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {02785EA4-86A5-4E57-9A9A-6998FAE1E617}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace csharpcore
|
namespace GildedRoseKata
|
||||||
{
|
{
|
||||||
public class GildedRose
|
public class GildedRose
|
||||||
{
|
{
|
||||||
9
csharpcore/GildedRose/GildedRose.csproj
Normal file
9
csharpcore/GildedRose/GildedRose.csproj
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
<StartupObject>GildedRoseKata.Program</StartupObject>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace csharpcore
|
namespace GildedRoseKata
|
||||||
{
|
{
|
||||||
public class Item
|
public class Item
|
||||||
{
|
{
|
||||||
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace csharpcore
|
namespace GildedRoseKata
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
@ -4,8 +4,9 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using ApprovalTests;
|
using ApprovalTests;
|
||||||
using ApprovalTests.Reporters;
|
using ApprovalTests.Reporters;
|
||||||
|
using GildedRoseKata;
|
||||||
|
|
||||||
namespace csharpcore
|
namespace GildedRoseTests
|
||||||
{
|
{
|
||||||
[UseReporter(typeof(DiffReporter))]
|
[UseReporter(typeof(DiffReporter))]
|
||||||
public class ApprovalTest
|
public class ApprovalTest
|
||||||
@ -1,17 +1,18 @@
|
|||||||
using Xunit;
|
using Xunit;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using GildedRoseKata;
|
||||||
namespace csharpcore
|
|
||||||
{
|
namespace GildedRoseTests
|
||||||
public class GildedRoseTest
|
{
|
||||||
{
|
public class GildedRoseTest
|
||||||
[Fact]
|
{
|
||||||
public void foo()
|
[Fact]
|
||||||
{
|
public void foo()
|
||||||
IList<Item> Items = new List<Item> { new Item { Name = "foo", SellIn = 0, Quality = 0 } };
|
{
|
||||||
GildedRose app = new GildedRose(Items);
|
IList<Item> Items = new List<Item> { new Item { Name = "foo", SellIn = 0, Quality = 0 } };
|
||||||
app.UpdateQuality();
|
GildedRose app = new GildedRose(Items);
|
||||||
Assert.Equal("fixme", Items[0].Name);
|
app.UpdateQuality();
|
||||||
}
|
Assert.Equal("fixme", Items[0].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@ -1,15 +1,20 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<IsPackable>false</IsPackable>
|
||||||
<StartupObject>csharpcore.Program</StartupObject>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
|
||||||
|
<ItemGroup>
|
||||||
<ItemGroup>
|
<PackageReference Include="ApprovalTests" Version="5.5.0" />
|
||||||
<PackageReference Include="ApprovalTests" Version="5.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
<PackageReference Include="coverlet.collector" Version="3.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\GildedRose\GildedRose.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Loading…
Reference in New Issue
Block a user