@@ -11,6 +11,8 @@
<AssemblyName>InfrastructureUnitTests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -35,6 +37,10 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.98.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.98.1\lib\net45\System.Data.SQLite.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -43,6 +49,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RegisterItemRepositoryTester.cs" />
<Compile Include="SquareRepositoryTests.cs" />
</ItemGroup>
<ItemGroup>
@@ -59,6 +66,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.98.1\build\net45\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.98.1\build\net45\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.98.1\build\net45\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.98.1\build\net45\System.Data.SQLite.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -0,0 +1,28 @@
using System;
using CashRegister.Infrastructure.Repository;
using NUnit.Framework;

namespace InfrastructureUnitTests
{
[TestFixture]
public class RegisterItemRepositoryTester
{
[Test]
public void GetAllItemsTest()
{
SquareItemRepository repo = new SquareItemRepository();
var item = repo.GetAllItems();
Assert.That(item.Count > 0);
}
[Test]
public void FindOneItem()
{
RegisterItemRepository repo = new RegisterItemRepository();
Guid itemid = Guid.Parse("af881f06-c3dd-4c74-94d6-58358fb1a8ea");

var item = repo.GetItemById(itemid);

Assert.That(item.Id == itemid);
}
}
}
@@ -20,7 +20,7 @@ public void FindOneItem()
SquareItemRepository repo = new SquareItemRepository();
Guid itemid = Guid.Parse("af881f06-c3dd-4c74-94d6-58358fb1a8ea");

var item = repo.FindItem(itemid);
var item = repo.GetItemById(itemid);

Assert.That(item.Id == itemid);
}
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="System.Data.SQLite.Core" version="1.0.98.1" targetFramework="net45" />
</packages>