Skip to content

Commit

Permalink
Rearrange file structure and remove hardcoded test path
Browse files Browse the repository at this point in the history
  • Loading branch information
jzebedee committed Oct 5, 2019
1 parent b284a0e commit c9b2ac9
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Chronicler/Chronicler.sln → Chronicler.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29319.158
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chronicler", "Chronicler.csproj", "{21E7FB31-022C-4917-A69C-5B428A67187E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chronicler", "src\Chronicler\Chronicler.csproj", "{21E7FB31-022C-4917-A69C-5B428A67187E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChroniclerTests", "..\test\ChronicleTests\ChroniclerTests.csproj", "{3577DBE9-BCF0-471A-9E74-FBFF1445D9C8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChroniclerTests", "test\ChroniclerTests\ChroniclerTests.csproj", "{3577DBE9-BCF0-471A-9E74-FBFF1445D9C8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
using System;
using System.IO;
using System.IO.Compression;
using System.Text.Json;
using Xunit;

namespace ChroniclerTests
{
public class ChronicleCollectionTest
{
private static JsonDocument GetCK2Json() => JsonDocument.Parse(File.ReadAllText(@"C:\Users\scorp\Desktop\ck2kok.json"));
private static string CK2JsonPath => Path.Combine("resources", "Ironman_West_Francia_HaR.json");

private static readonly JsonDocument CK2Json = JsonDocument.Parse(File.ReadAllText(CK2JsonPath));

[Fact]
public void TestParseJson()
{
var chronicleCollection = Chronicler.ChronicleCollection.ParseJson(GetCK2Json());
var chronicleCollection = Chronicler.ChronicleCollection.ParseJson(CK2Json);
Assert.False(string.IsNullOrEmpty(chronicleCollection.Chronicles[0].Chapters[0].Entries[0].Text));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Chronicler\Chronicler.csproj" />
<ProjectReference Include="..\..\src\Chronicler\Chronicler.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="resources\Ironman_West_Francia_HaR.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>

0 comments on commit c9b2ac9

Please sign in to comment.