Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 9de105f

Browse files
Moved TestValues class to GitTools.Testing namespace
1 parent 22437c2 commit 9de105f

File tree

3 files changed

+32
-27
lines changed

3 files changed

+32
-27
lines changed

src/GitTools.Core/Constants.cs

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,4 @@
11
namespace GitTools
22
{
3-
using System;
4-
using LibGit2Sharp;
5-
6-
public static class TestValues
7-
{
8-
private static DateTimeOffset _simulatedTime = DateTimeOffset.Now.AddHours(-1);
9-
10-
public static DateTimeOffset Now
11-
{
12-
get
13-
{
14-
_simulatedTime = _simulatedTime.AddMinutes(1);
15-
return _simulatedTime;
16-
}
17-
}
18-
19-
public static Signature SignatureNow()
20-
{
21-
var dateTimeOffset = Now;
22-
return Signature(dateTimeOffset);
23-
}
24-
25-
public static Signature Signature(DateTimeOffset dateTimeOffset)
26-
{
27-
return new Signature("A. U. Thor", "[email protected]", dateTimeOffset);
28-
}
29-
}
3+
// TODO: constants classes go here
304
}

src/GitTools.Core/GitTools.Core.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
</Compile>
6565
<Compile Include="App_Packages\LibLog.4.2\LibLog.cs" />
6666
<Compile Include="Constants.cs" />
67+
<Compile Include="Testing\TestValues.cs" />
6768
<Compile Include="Context\ContextBase.cs" />
6869
<Compile Include="Context\Interfaces\IAuthenticationContext.cs" />
6970
<Compile Include="Context\Interfaces\IContext.cs" />
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
namespace GitTools.Testing
2+
{
3+
using System;
4+
using LibGit2Sharp;
5+
6+
public static class TestValues
7+
{
8+
private static DateTimeOffset _simulatedTime = DateTimeOffset.Now.AddHours(-1);
9+
10+
public static DateTimeOffset Now
11+
{
12+
get
13+
{
14+
_simulatedTime = _simulatedTime.AddMinutes(1);
15+
return _simulatedTime;
16+
}
17+
}
18+
19+
public static Signature SignatureNow()
20+
{
21+
var dateTimeOffset = Now;
22+
return Signature(dateTimeOffset);
23+
}
24+
25+
public static Signature Signature(DateTimeOffset dateTimeOffset)
26+
{
27+
return new Signature("A. U. Thor", "[email protected]", dateTimeOffset);
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)