Skip to content

Commit

Permalink
Added solution and sublime configure sublime project
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyStewart committed Dec 13, 2014
1 parent 33f125c commit 79f2d95
Show file tree
Hide file tree
Showing 9 changed files with 428 additions and 502 deletions.
133 changes: 113 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,116 @@
obj
bin
Bin
_ReSharper.*
*.csproj.user
*.resharper.user
*.resharper
*.sw*
*.orig
**/tags
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.cache
*~
*.swp
Release
Debug
App_Data
RavenDb
*.user
*.sln.docstates
*.sublime-workspace
*.userprefs

packages/
Tools
build
iisnode
node_modules
*/test-results/
# Build results

[Dd]ebug*/
[Rr]elease/

#build/


[Tt]est[Rr]esult
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
*.vssscc
.builds
.DS_Store
.OpenIDE

*.pidb

*.log
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/

*.[Rr]e[Ss]harper

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Publish Web Output
*.Publish.xml

# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl

*.[Pp]ublish.xml

Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML

# NuGet
packages/

7 changes: 6 additions & 1 deletion GildedRose.UnitTests/GildedRose.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@
-->
<ItemGroup>
<ProjectReference Include="..\GildedRose\GildedRose.csproj">
<Project>{cb41ef38-823f-11e4-be41-3c15c2bea220}</Project>
<Project>{2DE7D313-9B85-423A-8DC4-0B7EB8099C8C}</Project>
<Name>GildedRose</Name>
</ProjectReference>
<!-- <ProjectReference Include="..\Wbl.Infrastructure\Wbl.Infrastructure.csproj">
<Project>{75b316d1-bc8a-4650-844c-434a452debd2}</Project>
<Name>Wbl.Infrastructure</Name>
</ProjectReference>
-->
</ItemGroup>
</Project>
192 changes: 96 additions & 96 deletions GildedRose.UnitTests/GivenABackstagePass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,113 +4,113 @@

namespace GildedRose.UnitTests
{
public class GivenABackstagePass
{
static String BACKSTAGE_PASS = "Backstage passes to a TAFKAL80ETC concert";
public class GivenABackstagePass
{
static String BACKSTAGE_PASS = "Backstage passes to a TAFKAL80ETC concert";

private Item UpdateFrom(int initialSellIn, int initialQuality)
{
Item item = new Item(BACKSTAGE_PASS, initialSellIn, initialQuality);
List<Item> items = new List<Item>();
items.Add(item);
GildedRose.UpdateQuality(items);
return item;
}
private Item UpdateFrom(int initialSellIn, int initialQuality)
{
Item item = new Item(BACKSTAGE_PASS, initialSellIn, initialQuality);
List<Item> items = new List<Item>();
items.Add(item);
GildedRose.UpdateQuality(items);
return item;
}

[Fact]
public void LongBeforeSellDate()
{
Item item = UpdateFrom(11, 10);
Assert.True(item.quality == 11);
Assert.True(item.sellIn == 10);
}
[Fact]
public void LongBeforeSellDate()
{
Item item = UpdateFrom(11, 10);
Assert.True(item.quality == 11);
Assert.True(item.sellIn == 10);
}

[Fact]
public void LongBeforeSellDateAtMaxQuality()
{
Item item = UpdateFrom(11, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 10);
}
[Fact]
public void LongBeforeSellDateAtMaxQuality()
{
Item item = UpdateFrom(11, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 10);
}

[Fact]
public void MediumCloseSellDateUpperBound()
{
Item item = UpdateFrom(10, 10);
Assert.True(item.quality == 12);
Assert.True(item.sellIn == 9);
}
[Fact]
public void MediumCloseSellDateUpperBound()
{
Item item = UpdateFrom(10, 10);
Assert.True(item.quality == 12);
Assert.True(item.sellIn == 9);
}

[Fact]
public void MediumCloseSellDateUpperBoundAtMaxQuality()
{
Item item = UpdateFrom(10, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 9);
}
[Fact]
public void MediumCloseSellDateUpperBoundAtMaxQuality()
{
Item item = UpdateFrom(10, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 9);
}

[Fact]
public void MediumCloseSellDateLowerBound()
{
Item item = UpdateFrom(6, 10);
Assert.True(item.quality == 12);
Assert.True(item.sellIn == 5);
}
[Fact]
public void MediumCloseSellDateLowerBound()
{
Item item = UpdateFrom(6, 10);
Assert.True(item.quality == 12);
Assert.True(item.sellIn == 5);
}

[Fact]
public void MediumCloseSellDateLowerBoundAtMaxQuality()
{
Item item = UpdateFrom(6, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 5);
}
[Fact]
public void MediumCloseSellDateLowerBoundAtMaxQuality()
{
Item item = UpdateFrom(6, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 5);
}

[Fact]
public void VeryCloseToSellDateUpperBound()
{
Item item = UpdateFrom(5, 10);
Assert.True(item.quality == 13);
Assert.True(item.sellIn == 4);
}
[Fact]
public void VeryCloseToSellDateUpperBound()
{
Item item = UpdateFrom(5, 10);
Assert.True(item.quality == 13);
Assert.True(item.sellIn == 4);
}

[Fact]
public void VeryCloseToSellDateUpperBoundAtMaxQuality()
{
Item item = UpdateFrom(5, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 4);
}
[Fact]
public void VeryCloseToSellDateUpperBoundAtMaxQuality()
{
Item item = UpdateFrom(5, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 4);
}

[Fact]
public void VeryCloseToSellDateLowerBound()
{
Item item = UpdateFrom(1, 10);
Assert.True(item.quality == 13);
Assert.True(item.sellIn == 0);
}
[Fact]
public void VeryCloseToSellDateLowerBound()
{
Item item = UpdateFrom(1, 10);
Assert.True(item.quality == 13);
Assert.True(item.sellIn == 0);
}

[Fact]
public void VeryCloseToSellDateLowerBoundAtMaxQuality()
{
Item item = UpdateFrom(1, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 0);
}
[Fact]
public void VeryCloseToSellDateLowerBoundAtMaxQuality()
{
Item item = UpdateFrom(1, 50);
Assert.True(item.quality == 50);
Assert.True(item.sellIn == 0);
}

[Fact]
public void OnSellDate()
{
Item item = UpdateFrom(0, 10);
Assert.True(item.quality == 0);
Assert.True(item.sellIn == -1);
}
[Fact]
public void OnSellDate()
{
Item item = UpdateFrom(0, 10);
Assert.True(item.quality == 0);
Assert.True(item.sellIn == -1);
}

[Fact]
public void AfterSellDate()
{
Item item = UpdateFrom(-10, 10);
Assert.True(item.quality == 0);
Assert.True(item.sellIn == -11);
}
}
[Fact]
public void AfterSellDate()
{
Item item = UpdateFrom(-10, 10);
Assert.True(item.quality == 0);
Assert.True(item.sellIn == -11);
}
}
}
28 changes: 28 additions & 0 deletions GildedRose.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GildedRose", "GildedRose\GildedRose.csproj", "{2DE7D313-9B85-423A-8DC4-0B7EB8099C8C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GildedRose.Tests", "GildedRose.UnitTests\GildedRose.UnitTests.csproj", "{BFC363EF-36D5-4C3E-8135-8D2635295A2F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2DE7D313-9B85-423A-8DC4-0B7EB8099C8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DE7D313-9B85-423A-8DC4-0B7EB8099C8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DE7D313-9B85-423A-8DC4-0B7EB8099C8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DE7D313-9B85-423A-8DC4-0B7EB8099C8C}.Release|Any CPU.Build.0 = Release|Any CPU
{BFC363EF-36D5-4C3E-8135-8D2635295A2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BFC363EF-36D5-4C3E-8135-8D2635295A2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BFC363EF-36D5-4C3E-8135-8D2635295A2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BFC363EF-36D5-4C3E-8135-8D2635295A2F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Loading

0 comments on commit 79f2d95

Please sign in to comment.