Fix up nunit tests + travis
This commit is contained in:
parent
9ca7bcabca
commit
e1114ccda8
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ config.yaml
|
|||||||
packets.log
|
packets.log
|
||||||
|
|
||||||
world/manifest.nbt
|
world/manifest.nbt
|
||||||
|
TestResult.xml
|
||||||
|
@ -6,7 +6,10 @@ before_install:
|
|||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
install:
|
install:
|
||||||
- nuget restore TrueCraft.sln
|
- nuget restore TrueCraft.sln
|
||||||
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner
|
- nuget install NUnit.Runners -Version 3.2.1 -OutputDirectory testrunner
|
||||||
script:
|
script:
|
||||||
- xbuild TrueCraft.sln
|
- xbuild TrueCraft.sln
|
||||||
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./TrueCraft.Core.Test/bin/Debug/TrueCraft.Core.Test.dll
|
- |
|
||||||
|
mono \
|
||||||
|
./testrunner/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe \
|
||||||
|
./TrueCraft.Core.Test/TrueCraft.Core.Test.csproj
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="YamlDotNet">
|
<Reference Include="YamlDotNet">
|
||||||
<HintPath>..\packages\YamlDotNet.3.8.0\lib\net35\YamlDotNet.dll</HintPath>
|
<HintPath>..\packages\YamlDotNet.3.9.0\lib\net35\YamlDotNet.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="YamlDotNet" version="3.8.0" targetFramework="net45" />
|
<package id="YamlDotNet" version="3.9.0" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -75,13 +75,13 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="MonoGame.Framework">
|
<Reference Include="MonoGame.Framework">
|
||||||
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.0.1678\lib\net40\MonoGame.Framework.dll</HintPath>
|
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NVorbis">
|
<Reference Include="NVorbis">
|
||||||
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.0.1678\lib\net40\NVorbis.dll</HintPath>
|
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="OpenTK">
|
<Reference Include="OpenTK">
|
||||||
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.0.1678\lib\net40\OpenTK.dll</HintPath>
|
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="MonoGame.Framework.DesktopGL" version="3.5.0.1678" targetFramework="net45" />
|
<package id="MonoGame.Framework.DesktopGL" version="3.5.1.1679" targetFramework="net45" />
|
||||||
<package id="NVorbis" version="0.8.4.0" targetFramework="net45" />
|
<package id="NVorbis" version="0.8.4.0" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -34,13 +34,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="Moq">
|
|
||||||
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="nunit.framework">
|
<Reference Include="nunit.framework">
|
||||||
<HintPath>..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
|
<HintPath>..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
|
||||||
<Private>False</Private>
|
</Reference>
|
||||||
|
<Reference Include="Castle.Core">
|
||||||
|
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Moq">
|
||||||
|
<HintPath>..\packages\Moq.4.5.10\lib\net45\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
@ -4,6 +4,8 @@ using TrueCraft.Core.World;
|
|||||||
using TrueCraft.API;
|
using TrueCraft.API;
|
||||||
using fNbt;
|
using fNbt;
|
||||||
using TrueCraft.Core.Logic.Blocks;
|
using TrueCraft.Core.Logic.Blocks;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace TrueCraft.Core.Test.World
|
namespace TrueCraft.Core.Test.World
|
||||||
{
|
{
|
||||||
@ -15,7 +17,8 @@ namespace TrueCraft.Core.Test.World
|
|||||||
[TestFixtureSetUp]
|
[TestFixtureSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
var file = new NbtFile("Files/TestChunk.nbt");
|
var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||||
|
var file = new NbtFile(Path.Combine(assemblyDir, "Files", "TestChunk.nbt"));
|
||||||
Chunk = Chunk.FromNbt(file);
|
Chunk = Chunk.FromNbt(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using TrueCraft.Core.World;
|
using TrueCraft.Core.World;
|
||||||
using TrueCraft.API;
|
using TrueCraft.API;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace TrueCraft.Core.Test.World
|
namespace TrueCraft.Core.Test.World
|
||||||
{
|
{
|
||||||
@ -14,7 +16,9 @@ namespace TrueCraft.Core.Test.World
|
|||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
var world = new TrueCraft.Core.World.World();
|
var world = new TrueCraft.Core.World.World();
|
||||||
Region = new Region(Coordinates2D.Zero, world, "Files/r.0.0.mca");
|
var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||||
|
Region = new Region(Coordinates2D.Zero, world,
|
||||||
|
Path.Combine(assemblyDir, "Files", "r.0.0.mca"));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -4,6 +4,8 @@ using NUnit.Framework;
|
|||||||
using TrueCraft.API;
|
using TrueCraft.API;
|
||||||
using TrueCraft.Core.TerrainGen;
|
using TrueCraft.Core.TerrainGen;
|
||||||
using TrueCraft.API.World;
|
using TrueCraft.API.World;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace TrueCraft.Core.Test.World
|
namespace TrueCraft.Core.Test.World
|
||||||
{
|
{
|
||||||
@ -15,7 +17,8 @@ namespace TrueCraft.Core.Test.World
|
|||||||
[TestFixtureSetUp]
|
[TestFixtureSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
World = TrueCraft.Core.World.World.LoadWorld("Files");
|
var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||||
|
World = TrueCraft.Core.World.World.LoadWorld(Path.Combine(assemblyDir, "Files"));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
|
<package id="Castle.Core" version="3.3.3" targetFramework="net45" />
|
||||||
<package id="NUnit" version="3.2.1" targetFramework="net45" />
|
<package id="Moq" version="4.5.10" targetFramework="net45" />
|
||||||
|
<package id="NUnit" version="3.4.1" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -41,7 +41,7 @@
|
|||||||
<HintPath>..\lib\Ionic.Zip.Reduced.dll</HintPath>
|
<HintPath>..\lib\Ionic.Zip.Reduced.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -38,7 +38,7 @@
|
|||||||
<HintPath>..\lib\Ionic.Zip.Reduced.dll</HintPath>
|
<HintPath>..\lib\Ionic.Zip.Reduced.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -94,7 +94,6 @@
|
|||||||
<None Include="truecraft">
|
<None Include="truecraft">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="packages.config" />
|
|
||||||
<None Include="..\lib\Xwt.Gtk3.dll">
|
<None Include="..\lib\Xwt.Gtk3.dll">
|
||||||
<Link>Xwt.Gtk3.dll</Link>
|
<Link>Xwt.Gtk3.dll</Link>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
@ -111,6 +110,7 @@
|
|||||||
<Link>Xwt.WPF.dll</Link>
|
<Link>Xwt.WPF.dll</Link>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Content\truecraft-logo.png" />
|
<EmbeddedResource Include="Content\truecraft-logo.png" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -38,7 +38,7 @@
|
|||||||
<HintPath>..\lib\Ionic.Zip.Reduced.dll</HintPath>
|
<HintPath>..\lib\Ionic.Zip.Reduced.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="YamlDotNet">
|
<Reference Include="YamlDotNet">
|
||||||
<HintPath>..\packages\YamlDotNet.3.8.0\lib\net35\YamlDotNet.dll</HintPath>
|
<HintPath>..\packages\YamlDotNet.3.9.0\lib\net35\YamlDotNet.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="YamlDotNet" version="3.8.0" targetFramework="net45" />
|
<package id="YamlDotNet" version="3.9.0" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
Loading…
x
Reference in New Issue
Block a user