Skip to content

Commit

Permalink
Move LogLine tests to HearthWatcher.Test
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Mar 24, 2017
1 parent 9ad33c3 commit 1acb5d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion HDTTests/HDTTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
<Compile Include="Hearthstone\WebImportTest.cs" />
<Compile Include="Hearthstone\DeckTest.cs" />
<Compile Include="Hearthstone\CardDbTest.cs" />
<Compile Include="LogReader\LogLineItemTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions HearthWatcher.Test/HearthWatcher.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
</Choose>
<ItemGroup>
<Compile Include="ArenaWatcherTests.cs" />
<Compile Include="LogLineTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System;
using System.Linq;
using System.Threading;
using Hearthstone_Deck_Tracker.LogReader;
using HearthWatcher.LogReader;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace HDTTests.LogReader
namespace HearthWatcher.Test
{
[TestClass]
public class LogLineItemTests
public class LogLineTests
{
[TestMethod]
public void TimeStampTest()
Expand All @@ -17,7 +17,7 @@ public void TimeStampTest()
"D 00:06:10.0000000 GameState",
"D 00:06:10.0010000 GameState",
"D 00:06:10 GameState.DebugPrintPower() - tag=ZONE value=PLAY"
}.Select(x => new LogLineItem("Power", x)).ToArray();
}.Select(x => new LogLine("Power", x)).ToArray();
Assert.AreEqual(lines[0].Time, lines[2].Time);
Assert.IsTrue(lines[1].Time > lines[2].Time);
}
Expand All @@ -26,7 +26,7 @@ public void TimeStampTest()
public void LineContentTest()
{
const string line = "D 00:06:10.0010000 GameState.DebugPrintPower() - tag=ZONE value=PLAY";
var lineItem = new LogLineItem("Power", line);
var lineItem = new LogLine("Power", line);
Assert.AreEqual("D " + lineItem.Time.ToString("HH:mm:ss.fffffff") + " " + lineItem.LineContent, line);
}

Expand All @@ -36,7 +36,7 @@ public void DayRolloverTest()
if(DateTime.Now.AddSeconds(5).Date > DateTime.Now.Date)
Thread.Sleep(5000);
const string line = "D 23:59:59.9999999 GameState.DebugPrintPower() - tag=ZONE value=PLAY";
var lineItem = new LogLineItem("Power", line);
var lineItem = new LogLine("Power", line);
Assert.AreEqual(lineItem.Time.Date, DateTime.Now.Date.AddDays(-1));
}
}
Expand Down

0 comments on commit 1acb5d3

Please sign in to comment.