Skip to content

Commit a0f8e39

Browse files
author
Henning Moe
committed
Add integration test for #406.
1 parent 35832d4 commit a0f8e39

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

GitVersionTask.Tests/GitVersionTask.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
<Compile Include="Helpers\Lg2sHelperBase.cs" />
113113
<Compile Include="UpdateAssemblyInfoTests.cs" />
114114
<Compile Include="ModuleInitializer.cs" />
115+
<Compile Include="WriteVersionInfoToBuildLogTests.cs" />
115116
</ItemGroup>
116117
<ItemGroup>
117118
<None Include="app.config" />
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+

2+
namespace GitVersionTask.Tests
3+
{
4+
using System.IO;
5+
using NUnit.Framework;
6+
7+
[TestFixture]
8+
public class WriteVersionInfoToBuildLogTests
9+
{
10+
[Test]
11+
public void UsingInvalidGitDirectory_ThrowsDirectoryNotFoundException()
12+
{
13+
var task = new WriteVersionInfoToBuildLog
14+
{
15+
BuildEngine = new MockBuildEngine(),
16+
SolutionDirectory = Path.GetTempPath()
17+
};
18+
19+
Assert.That(task.InnerExecute, Throws.InstanceOf<DirectoryNotFoundException>());
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)