Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

First Requirement - code inside the test method

  • Loading branch information...
michal-franc committed Mar 5, 2014
1 parent 32bef5e commit 0ad433b022b131f056c67336881f15a71b314fb4
@@ -1,10 +1,22 @@
using NUnit.Framework;
using System.Linq;
using NUnit.Framework;

namespace TddStringCalculator
{
[TestFixture]
public class Class1
{
[Test]
public void ICanParseString_AndSumUpValues()
{
var input = "1,2,3,4,5";
var expectedSum = 15;

var values = input.Split(',');

var actualSum = values.Select(x => int.Parse(x)).Sum();

Assert.That(actualSum, Is.EqualTo(expectedSum));
}
}
}
}
@@ -30,6 +30,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@@ -39,8 +42,11 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Class1.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

0 comments on commit 0ad433b

Please sign in to comment.
You can’t perform that action at this time.