Commit 0d6a317e authored by Steve Smith's avatar Steve Smith

wired up xunit and a few simple tests to start

parent d6656043
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>0f6a8976-f61a-4eb3-a38c-0a2ed39f157b</ProjectGuid> <ProjectGuid>0f6a8976-f61a-4eb3-a38c-0a2ed39f157b</ProjectGuid>
...@@ -13,9 +12,11 @@ ...@@ -13,9 +12,11 @@
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> </Project>
\ No newline at end of file
using CleanArchitecture.Core.Model;
using CleanArchitecture.Core.Events;
using System.Linq;
using Xunit;
namespace CleanArchitecture.Tests.Core.Model
{
public class ToDoItemMarkCompleteShould
{
[Fact]
public void SetIsDoneToTrue()
{
var item = new ToDoItem();
item.MarkComplete();
Assert.True(item.IsDone);
}
[Fact]
public void RaiseToDoItemCompletedEvent()
{
var item = new ToDoItem();
item.MarkComplete();
Assert.Equal(1, item.Events.Count());
Assert.IsType<ToDoItemCompletedEvent>(item.Events.First());
}
}
}
\ No newline at end of file
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"testRunner": "xunit",
"dependencies": { "dependencies": {
"CleanArchitecture.Core": "1.0.0-*", "CleanArchitecture.Core": "1.0.0-*",
"NETStandard.Library": "1.6.0" "NETStandard.Library": "1.6.0",
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029"
}, },
"frameworks": { "frameworks": {
"netstandard1.6": { "netcoreapp1.0": {
"imports": "dnxcore50" "dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
}
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment