-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove test resources because we download them now on runtime
- Loading branch information
Showing
21 changed files
with
96 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Net; | ||
|
||
namespace Warcraft.NET.Tests.Files.ADT | ||
{ | ||
internal class TestResource | ||
{ | ||
/// <summary> | ||
/// Thx to Wago for hosting the CASC API <3 | ||
/// </summary> | ||
private const string BASE_URL_CASC_API = "https://wago.tools/api/casc"; | ||
|
||
internal static byte[] Download(uint fileId, string version) | ||
{ | ||
#pragma warning disable SYSLIB0014 | ||
using (var client = new WebClient()) | ||
return client.DownloadData($"{BASE_URL_CASC_API}/{fileId}?download&version={version}"); | ||
#pragma warning restore SYSLIB0014 | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,48 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Warcraft.NET.Tests.Files.ADT; | ||
using BfAWMO = Warcraft.NET.Files.WMO.WorldMapObject.BfA.WorldMapObjectRoot; | ||
|
||
namespace Warcraft.NET.Tests.Files.WMO.Chunks.BfA | ||
{ | ||
[TestClass] | ||
public class MOHDTests | ||
{ | ||
public BfAWMO BfAWMO; | ||
public BfAWMO BfAWrittenWMO; | ||
|
||
public MOHDTests() | ||
{ | ||
// 8or_pvp_warsongbg_tower01.wmo | ||
BfAWMO = new BfAWMO(TestResource.Download(2395014, "8.3.7.35662")); | ||
BfAWrittenWMO = new BfAWMO(BfAWMO.Serialize()); | ||
} | ||
|
||
[TestMethod] | ||
public void TestLoadBinaryData() | ||
{ | ||
Assert.AreEqual(Tests.BfAWMO.Header.Materials, Tests.BfAWrittenWMO.Header.Materials); | ||
Assert.AreEqual(Tests.BfAWMO.Header.Portals, Tests.BfAWrittenWMO.Header.Portals); | ||
Assert.AreEqual(Tests.BfAWMO.Header.Lights, Tests.BfAWrittenWMO.Header.Lights); | ||
Assert.AreEqual(Tests.BfAWMO.Header.DoodadNames, Tests.BfAWrittenWMO.Header.DoodadNames); | ||
Assert.AreEqual(Tests.BfAWMO.Header.DoodadDefinitions, Tests.BfAWrittenWMO.Header.DoodadDefinitions); | ||
Assert.AreEqual(Tests.BfAWMO.Header.DoodadSets, Tests.BfAWrittenWMO.Header.DoodadSets); | ||
Assert.AreEqual(Tests.BfAWMO.Header.Color, Tests.BfAWrittenWMO.Header.Color); | ||
Assert.AreEqual(Tests.BfAWMO.Header.WMOId, Tests.BfAWrittenWMO.Header.WMOId); | ||
Assert.AreEqual(Tests.BfAWMO.Header.BoundingBox, Tests.BfAWrittenWMO.Header.BoundingBox); | ||
Assert.AreEqual(Tests.BfAWMO.Header.Flags, Tests.BfAWrittenWMO.Header.Flags); | ||
Assert.AreEqual(Tests.BfAWMO.Header.Groups, Tests.BfAWrittenWMO.Header.Groups); | ||
Assert.AreEqual(BfAWMO.Header.Materials, BfAWrittenWMO.Header.Materials); | ||
Assert.AreEqual(BfAWMO.Header.Portals, BfAWrittenWMO.Header.Portals); | ||
Assert.AreEqual(BfAWMO.Header.Lights, BfAWrittenWMO.Header.Lights); | ||
Assert.AreEqual(BfAWMO.Header.DoodadNames, BfAWrittenWMO.Header.DoodadNames); | ||
Assert.AreEqual(BfAWMO.Header.DoodadDefinitions, BfAWrittenWMO.Header.DoodadDefinitions); | ||
Assert.AreEqual(BfAWMO.Header.DoodadSets, BfAWrittenWMO.Header.DoodadSets); | ||
Assert.AreEqual(BfAWMO.Header.Color, BfAWrittenWMO.Header.Color); | ||
Assert.AreEqual(BfAWMO.Header.WMOId, BfAWrittenWMO.Header.WMOId); | ||
Assert.AreEqual(BfAWMO.Header.BoundingBox, BfAWrittenWMO.Header.BoundingBox); | ||
Assert.AreEqual(BfAWMO.Header.Flags, BfAWrittenWMO.Header.Flags); | ||
Assert.AreEqual(BfAWMO.Header.Groups, BfAWrittenWMO.Header.Groups); | ||
} | ||
|
||
[TestMethod] | ||
public void TestGetSignature() | ||
{ | ||
Assert.AreEqual(Tests.BfAWMO.Header.GetSignature(), Tests.BfAWrittenWMO.Header.GetSignature()); | ||
Assert.AreEqual(BfAWMO.Header.GetSignature(), BfAWrittenWMO.Header.GetSignature()); | ||
} | ||
|
||
[TestMethod] | ||
public void TestGetSize() | ||
{ | ||
Assert.AreEqual(Tests.BfAWMO.Header.GetSize(), Tests.BfAWrittenWMO.Header.GetSize()); | ||
Assert.AreEqual(BfAWMO.Header.GetSize(), BfAWrittenWMO.Header.GetSize()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,48 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Warcraft.NET.Tests.Files.ADT; | ||
using LegionWMO = Warcraft.NET.Files.WMO.WorldMapObject.Legion.WorldMapObjectRoot; | ||
|
||
namespace Warcraft.NET.Tests.Files.WMO.Chunks.Legion | ||
{ | ||
[TestClass] | ||
public class MOHDTests | ||
{ | ||
public LegionWMO LegionWMO; | ||
public LegionWMO LegionWrittenWMO; | ||
|
||
public MOHDTests() | ||
{ | ||
// 7du_violethold_trapdoor_transport.wmo | ||
LegionWMO = new LegionWMO(TestResource.Download(1326805, "7.3.5.26972")); | ||
LegionWrittenWMO = new LegionWMO(LegionWMO.Serialize()); | ||
} | ||
|
||
[TestMethod] | ||
public void TestLoadBinaryData() | ||
{ | ||
Assert.AreEqual(Tests.LegionWMO.Header.Materials, Tests.LegionWrittenWMO.Header.Materials); | ||
Assert.AreEqual(Tests.LegionWMO.Header.Portals, Tests.LegionWrittenWMO.Header.Portals); | ||
Assert.AreEqual(Tests.LegionWMO.Header.Lights, Tests.LegionWrittenWMO.Header.Lights); | ||
Assert.AreEqual(Tests.LegionWMO.Header.DoodadNames, Tests.LegionWrittenWMO.Header.DoodadNames); | ||
Assert.AreEqual(Tests.LegionWMO.Header.DoodadDefinitions, Tests.LegionWrittenWMO.Header.DoodadDefinitions); | ||
Assert.AreEqual(Tests.LegionWMO.Header.DoodadSets, Tests.LegionWrittenWMO.Header.DoodadSets); | ||
Assert.AreEqual(Tests.LegionWMO.Header.Color, Tests.LegionWrittenWMO.Header.Color); | ||
Assert.AreEqual(Tests.LegionWMO.Header.WMOId, Tests.LegionWrittenWMO.Header.WMOId); | ||
Assert.AreEqual(Tests.LegionWMO.Header.BoundingBox, Tests.LegionWrittenWMO.Header.BoundingBox); | ||
Assert.AreEqual(Tests.LegionWMO.Header.Flags, Tests.LegionWrittenWMO.Header.Flags); | ||
Assert.AreEqual(Tests.LegionWMO.Header.Groups, Tests.LegionWrittenWMO.Header.Groups); | ||
Assert.AreEqual(LegionWMO.Header.Materials, LegionWrittenWMO.Header.Materials); | ||
Assert.AreEqual(LegionWMO.Header.Portals, LegionWrittenWMO.Header.Portals); | ||
Assert.AreEqual(LegionWMO.Header.Lights, LegionWrittenWMO.Header.Lights); | ||
Assert.AreEqual(LegionWMO.Header.DoodadNames, LegionWrittenWMO.Header.DoodadNames); | ||
Assert.AreEqual(LegionWMO.Header.DoodadDefinitions, LegionWrittenWMO.Header.DoodadDefinitions); | ||
Assert.AreEqual(LegionWMO.Header.DoodadSets, LegionWrittenWMO.Header.DoodadSets); | ||
Assert.AreEqual(LegionWMO.Header.Color, LegionWrittenWMO.Header.Color); | ||
Assert.AreEqual(LegionWMO.Header.WMOId, LegionWrittenWMO.Header.WMOId); | ||
Assert.AreEqual(LegionWMO.Header.BoundingBox, LegionWrittenWMO.Header.BoundingBox); | ||
Assert.AreEqual(LegionWMO.Header.Flags, LegionWrittenWMO.Header.Flags); | ||
Assert.AreEqual(LegionWMO.Header.Groups, LegionWrittenWMO.Header.Groups); | ||
} | ||
|
||
[TestMethod] | ||
public void TestGetSignature() | ||
{ | ||
Assert.AreEqual(Tests.LegionWMO.Header.GetSignature(), Tests.LegionWrittenWMO.Header.GetSignature()); | ||
Assert.AreEqual(LegionWMO.Header.GetSignature(), LegionWrittenWMO.Header.GetSignature()); | ||
} | ||
|
||
[TestMethod] | ||
public void TestGetSize() | ||
{ | ||
Assert.AreEqual(Tests.LegionWMO.Header.GetSize(), Tests.LegionWrittenWMO.Header.GetSize()); | ||
Assert.AreEqual(LegionWMO.Header.GetSize(), LegionWrittenWMO.Header.GetSize()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,48 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Warcraft.NET.Tests.Files.ADT; | ||
using WoDWMO = Warcraft.NET.Files.WMO.WorldMapObject.WoD.WorldMapObjectRoot; | ||
|
||
namespace Warcraft.NET.Tests.Files.WMO.Chunks.WoD | ||
{ | ||
[TestClass] | ||
public class MOHDTests | ||
{ | ||
public WoDWMO WoDWMO; | ||
public WoDWMO WoDWrittenWMO; | ||
|
||
public MOHDTests() | ||
{ | ||
// duskwood_lumbermill.wmo | ||
WoDWMO = new WoDWMO(TestResource.Download(106759, "6.2.4.21742")); | ||
WoDWrittenWMO = new WoDWMO(WoDWMO.Serialize()); | ||
} | ||
|
||
[TestMethod] | ||
public void TestLoadBinaryData() | ||
{ | ||
Assert.AreEqual(Tests.WoDWMO.Header.Materials, Tests.WoDWrittenWMO.Header.Materials); | ||
Assert.AreEqual(Tests.WoDWMO.Header.Portals, Tests.WoDWrittenWMO.Header.Portals); | ||
Assert.AreEqual(Tests.WoDWMO.Header.Lights, Tests.WoDWrittenWMO.Header.Lights); | ||
Assert.AreEqual(Tests.WoDWMO.Header.DoodadNames, Tests.WoDWrittenWMO.Header.DoodadNames); | ||
Assert.AreEqual(Tests.WoDWMO.Header.DoodadDefinitions, Tests.WoDWrittenWMO.Header.DoodadDefinitions); | ||
Assert.AreEqual(Tests.WoDWMO.Header.DoodadSets, Tests.WoDWrittenWMO.Header.DoodadSets); | ||
Assert.AreEqual(Tests.WoDWMO.Header.Color, Tests.WoDWrittenWMO.Header.Color); | ||
Assert.AreEqual(Tests.WoDWMO.Header.WMOId, Tests.WoDWrittenWMO.Header.WMOId); | ||
Assert.AreEqual(Tests.WoDWMO.Header.BoundingBox, Tests.WoDWrittenWMO.Header.BoundingBox); | ||
Assert.AreEqual(Tests.WoDWMO.Header.Flags, Tests.WoDWrittenWMO.Header.Flags); | ||
Assert.AreEqual(Tests.WoDWMO.Header.Groups, Tests.WoDWrittenWMO.Header.Groups); | ||
Assert.AreEqual(WoDWMO.Header.Materials, WoDWrittenWMO.Header.Materials); | ||
Assert.AreEqual(WoDWMO.Header.Portals, WoDWrittenWMO.Header.Portals); | ||
Assert.AreEqual(WoDWMO.Header.Lights, WoDWrittenWMO.Header.Lights); | ||
Assert.AreEqual(WoDWMO.Header.DoodadNames, WoDWrittenWMO.Header.DoodadNames); | ||
Assert.AreEqual(WoDWMO.Header.DoodadDefinitions, WoDWrittenWMO.Header.DoodadDefinitions); | ||
Assert.AreEqual(WoDWMO.Header.DoodadSets, WoDWrittenWMO.Header.DoodadSets); | ||
Assert.AreEqual(WoDWMO.Header.Color, WoDWrittenWMO.Header.Color); | ||
Assert.AreEqual(WoDWMO.Header.WMOId, WoDWrittenWMO.Header.WMOId); | ||
Assert.AreEqual(WoDWMO.Header.BoundingBox, WoDWrittenWMO.Header.BoundingBox); | ||
Assert.AreEqual(WoDWMO.Header.Flags, WoDWrittenWMO.Header.Flags); | ||
Assert.AreEqual(WoDWMO.Header.Groups, WoDWrittenWMO.Header.Groups); | ||
} | ||
|
||
[TestMethod] | ||
public void TestGetSignature() | ||
{ | ||
Assert.AreEqual(Tests.WoDWMO.Header.GetSignature(), Tests.WoDWrittenWMO.Header.GetSignature()); | ||
Assert.AreEqual(WoDWMO.Header.GetSignature(), WoDWrittenWMO.Header.GetSignature()); | ||
} | ||
|
||
[TestMethod] | ||
public void TestGetSize() | ||
{ | ||
Assert.AreEqual(Tests.WoDWMO.Header.GetSize(), Tests.WoDWrittenWMO.Header.GetSize()); | ||
Assert.AreEqual(WoDWMO.Header.GetSize(), WoDWrittenWMO.Header.GetSize()); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file removed
BIN
-484 Bytes
Warcraft.NET.Tests/Resources/WMO/7du_violethold_trapdoor_transport.wmo
Binary file not shown.
Binary file removed
BIN
-7.59 KB
Warcraft.NET.Tests/Resources/WMO/7du_violethold_trapdoor_transport_000.wmo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-489 KB
Warcraft.NET.Tests/Resources/WMO/8or_pvp_warsongbg_tower01_000_lod1.wmo
Binary file not shown.
Binary file removed
BIN
-239 KB
Warcraft.NET.Tests/Resources/WMO/8or_pvp_warsongbg_tower01_000_lod2.wmo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters