Skip to content

Commit ed9ebcc

Browse files
committed
Added functionality for Record
Building out the Database
1 parent a41b04a commit ed9ebcc

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

Jump.Location.Specs/Jump.Location.Specs.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,14 @@
4545
<Reference Include="xunit">
4646
<HintPath>..\packages\xunit.1.9.1\lib\net20\xunit.dll</HintPath>
4747
</Reference>
48+
<Reference Include="xunit.extensions">
49+
<HintPath>..\packages\xunit.extensions.1.9.1\lib\net20\xunit.extensions.dll</HintPath>
50+
</Reference>
4851
</ItemGroup>
4952
<ItemGroup>
5053
<Compile Include="DirectoryWaitPeriodSpec.cs" />
5154
<Compile Include="Properties\AssemblyInfo.cs" />
55+
<Compile Include="RecordSpec.cs" />
5256
</ItemGroup>
5357
<ItemGroup>
5458
<None Include="packages.config" />

Jump.Location.Specs/RecordSpec.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using Should;
3+
using Xunit;
4+
using Xunit.Extensions;
5+
6+
namespace Jump.Location.Specs
7+
{
8+
public class RecordSpec
9+
{
10+
public class DescribeFullName
11+
{
12+
[Fact]
13+
public void It_splits_the_supplied_path_on_the_cons()
14+
{
15+
var record = new Record("provider::path", 0);
16+
record.Provider.ShouldEqual("provider");
17+
record.Path.ShouldEqual("path");
18+
}
19+
20+
[Theory]
21+
[InlineData("C:\\debug\\")]
22+
[InlineData("")]
23+
[InlineData("::")]
24+
[InlineData("::C:\\debug")]
25+
[InlineData("C:\\debug::")]
26+
public void It_throws_ArgumentException_when_path_is_invalid(string path)
27+
{
28+
Assert.Throws<ArgumentException>(() => new Record(path, 0));
29+
}
30+
}
31+
}
32+
}

Jump.Location.Specs/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
<packages>
33
<package id="Should" version="1.1.12.0" />
44
<package id="xunit" version="1.9.1" />
5+
<package id="xunit.extensions" version="1.9.1" />
56
</packages>

Jump.Location.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jump.Location", "Jump.Locat
55
EndProject
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jump.Location.Specs", "Jump.Location.Specs\Jump.Location.Specs.csproj", "{C0A231D4-4E62-4E22-BD81-EB8257B15D21}"
77
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{4B6F34CE-160F-4857-82B2-6369A41AA07B}"
9+
ProjectSection(SolutionItems) = preProject
10+
.nuget\NuGet.exe = .nuget\NuGet.exe
11+
.nuget\NuGet.targets = .nuget\NuGet.targets
12+
EndProjectSection
13+
EndProject
814
Global
915
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1016
Debug|Any CPU = Debug|Any CPU

0 commit comments

Comments
 (0)