From d23eec443345b0b623266920e94502892f5f5a02 Mon Sep 17 00:00:00 2001 From: Daniel Cronqvist Date: Sat, 7 Sep 2024 13:23:32 +0200 Subject: [PATCH] Move test data and current tests into UnitTests --- src/DotTiled.Tests/DotTiled.Tests.csproj | 12 ++--- src/DotTiled.Tests/Serialization/TestData.cs | 47 ----------------- .../Maps}/default-map/default-map.cs | 0 .../Maps}/default-map/default-map.tmj | 0 .../Maps}/default-map/default-map.tmx | 0 .../map-external-tileset-multi.cs | 0 .../map-external-tileset-multi.tmj | 0 .../map-external-tileset-multi.tmx | 0 .../multi-tileset.tsj | 0 .../multi-tileset.tsx | 0 .../map-external-tileset-multi/tileset.png | Bin .../map-external-tileset-wangset.cs | 0 .../map-external-tileset-wangset.tmj | 0 .../map-external-tileset-wangset.tmx | 0 .../map-external-tileset-wangset/tileset.png | Bin .../wangset-tileset.tsj | 0 .../wangset-tileset.tsx | 0 .../map-with-class-and-props.cs | 0 .../map-with-class-and-props.tmj | 0 .../map-with-class-and-props.tmx | 0 .../Maps}/map-with-class/map-with-class.cs | 0 .../Maps}/map-with-class/map-with-class.tmj | 0 .../Maps}/map-with-class/map-with-class.tmx | 0 .../map-with-common-props.cs | 0 .../map-with-common-props.tmj | 0 .../map-with-common-props.tmx | 0 .../map-with-custom-type-props.cs | 0 .../map-with-custom-type-props.tmj | 0 .../map-with-custom-type-props.tmx | 0 .../propertytypes.json | 0 .../map-with-deep-props.cs | 0 .../map-with-deep-props.tmj | 0 .../map-with-deep-props.tmx | 0 .../map-with-embedded-tileset.cs | 0 .../map-with-embedded-tileset.tmj | 0 .../map-with-embedded-tileset.tmx | 0 .../map-with-embedded-tileset/tileset.png | Bin .../map-with-external-tileset.cs | 0 .../map-with-external-tileset.tmj | 0 .../map-with-external-tileset.tmx | 0 .../map-with-external-tileset/tileset.png | Bin .../map-with-external-tileset/tileset.tsj | 0 .../map-with-external-tileset/tileset.tsx | 0 .../map-with-flippingflags.cs | 0 .../map-with-flippingflags.tmj | 0 .../map-with-flippingflags.tmx | 0 .../Maps}/map-with-flippingflags/tileset.png | Bin .../Maps}/map-with-flippingflags/tileset.tsj | 0 .../Maps}/map-with-flippingflags/tileset.tsx | 0 .../map-with-many-layers.cs | 0 .../map-with-many-layers.tmj | 0 .../map-with-many-layers.tmx | 0 .../Maps}/map-with-many-layers/poly.tj | 0 .../Maps}/map-with-many-layers/poly.tx | 0 .../Maps}/map-with-many-layers/tileset.png | Bin .../Maps}/map-with-many-layers/tileset.tsj | 0 .../Maps}/map-with-many-layers/tileset.tsx | 0 .../{ => UnitTests}/OptionalTests.cs | 0 .../CustomTypes/CustomClassDefinitionTests.cs | 0 .../CustomTypes/CustomEnumDefinitionTests.cs | 0 .../Properties/HasPropertiesBaseTests.cs | 0 .../DefaultResourceCacheTests.cs | 0 .../Serialization/LoaderTests.cs | 12 ----- .../Serialization/MapReaderTests.cs | 0 .../UnitTests/Serialization/TestData.cs | 49 ++++++++++++++++++ .../Serialization/Tmj/TmjMapReaderTests.cs | 0 .../Serialization/Tmx/TmxMapReaderTests.cs | 0 67 files changed, 55 insertions(+), 65 deletions(-) delete mode 100644 src/DotTiled.Tests/Serialization/TestData.cs rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/default-map/default-map.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/default-map/default-map.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/default-map/default-map.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-multi/map-external-tileset-multi.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-multi/map-external-tileset-multi.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-multi/map-external-tileset-multi.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-multi/multi-tileset.tsj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-multi/multi-tileset.tsx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-multi/tileset.png (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-wangset/map-external-tileset-wangset.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-wangset/map-external-tileset-wangset.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-wangset/map-external-tileset-wangset.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-wangset/tileset.png (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-wangset/wangset-tileset.tsj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-external-tileset-wangset/wangset-tileset.tsx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-class-and-props/map-with-class-and-props.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-class-and-props/map-with-class-and-props.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-class-and-props/map-with-class-and-props.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-class/map-with-class.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-class/map-with-class.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-class/map-with-class.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-common-props/map-with-common-props.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-common-props/map-with-common-props.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-common-props/map-with-common-props.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-custom-type-props/map-with-custom-type-props.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-custom-type-props/map-with-custom-type-props.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-custom-type-props/map-with-custom-type-props.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-custom-type-props/propertytypes.json (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-deep-props/map-with-deep-props.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-deep-props/map-with-deep-props.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-deep-props/map-with-deep-props.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-embedded-tileset/map-with-embedded-tileset.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-embedded-tileset/map-with-embedded-tileset.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-embedded-tileset/map-with-embedded-tileset.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-embedded-tileset/tileset.png (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-external-tileset/map-with-external-tileset.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-external-tileset/map-with-external-tileset.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-external-tileset/map-with-external-tileset.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-external-tileset/tileset.png (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-external-tileset/tileset.tsj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-external-tileset/tileset.tsx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-flippingflags/map-with-flippingflags.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-flippingflags/map-with-flippingflags.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-flippingflags/map-with-flippingflags.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-flippingflags/tileset.png (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-flippingflags/tileset.tsj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-flippingflags/tileset.tsx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/map-with-many-layers.cs (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/map-with-many-layers.tmj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/map-with-many-layers.tmx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/poly.tj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/poly.tx (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/tileset.png (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/tileset.tsj (100%) rename src/DotTiled.Tests/{Serialization/TestData/Map => TestData/Maps}/map-with-many-layers/tileset.tsx (100%) rename src/DotTiled.Tests/{ => UnitTests}/OptionalTests.cs (100%) rename src/DotTiled.Tests/{ => UnitTests}/Properties/CustomTypes/CustomClassDefinitionTests.cs (100%) rename src/DotTiled.Tests/{ => UnitTests}/Properties/CustomTypes/CustomEnumDefinitionTests.cs (100%) rename src/DotTiled.Tests/{ => UnitTests}/Properties/HasPropertiesBaseTests.cs (100%) rename src/DotTiled.Tests/{ => UnitTests}/Serialization/DefaultResourceCacheTests.cs (100%) rename src/DotTiled.Tests/{ => UnitTests}/Serialization/LoaderTests.cs (95%) rename src/DotTiled.Tests/{ => UnitTests}/Serialization/MapReaderTests.cs (100%) create mode 100644 src/DotTiled.Tests/UnitTests/Serialization/TestData.cs rename src/DotTiled.Tests/{ => UnitTests}/Serialization/Tmj/TmjMapReaderTests.cs (100%) rename src/DotTiled.Tests/{ => UnitTests}/Serialization/Tmx/TmxMapReaderTests.cs (100%) diff --git a/src/DotTiled.Tests/DotTiled.Tests.csproj b/src/DotTiled.Tests/DotTiled.Tests.csproj index fe6e8c9..552a423 100644 --- a/src/DotTiled.Tests/DotTiled.Tests.csproj +++ b/src/DotTiled.Tests/DotTiled.Tests.csproj @@ -26,12 +26,12 @@ - - - - - - + + + + + + diff --git a/src/DotTiled.Tests/Serialization/TestData.cs b/src/DotTiled.Tests/Serialization/TestData.cs deleted file mode 100644 index 582bd70..0000000 --- a/src/DotTiled.Tests/Serialization/TestData.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Xml; - -namespace DotTiled.Tests; - -public static partial class TestData -{ - public static XmlReader GetXmlReaderFor(string testDataFile) - { - var fullyQualifiedTestDataFile = $"DotTiled.Tests.{ConvertPathToAssemblyResourcePath(testDataFile)}"; - using var stream = typeof(TestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile) - ?? throw new ArgumentException($"Test data file '{fullyQualifiedTestDataFile}' not found"); - - using var stringReader = new StreamReader(stream); - var xml = stringReader.ReadToEnd(); - var xmlStringReader = new StringReader(xml); - return XmlReader.Create(xmlStringReader); - } - - public static string GetRawStringFor(string testDataFile) - { - var fullyQualifiedTestDataFile = $"DotTiled.Tests.{ConvertPathToAssemblyResourcePath(testDataFile)}"; - using var stream = typeof(TestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile) - ?? throw new ArgumentException($"Test data file '{fullyQualifiedTestDataFile}' not found"); - - using var stringReader = new StreamReader(stream); - return stringReader.ReadToEnd(); - } - - private static string ConvertPathToAssemblyResourcePath(string path) => - path.Replace("/", ".").Replace("\\", ".").Replace(" ", "_"); - - public static IEnumerable MapTests => - [ - ["Serialization/TestData/Map/default_map/default-map", (string f) => DefaultMap(), Array.Empty()], - ["Serialization/TestData/Map/map_with_common_props/map-with-common-props", (string f) => MapWithCommonProps(), Array.Empty()], - ["Serialization/TestData/Map/map_with_custom_type_props/map-with-custom-type-props", (string f) => MapWithCustomTypeProps(), MapWithCustomTypePropsCustomTypeDefinitions()], - ["Serialization/TestData/Map/map_with_embedded_tileset/map-with-embedded-tileset", (string f) => MapWithEmbeddedTileset(), Array.Empty()], - ["Serialization/TestData/Map/map_with_external_tileset/map-with-external-tileset", (string f) => MapWithExternalTileset(f), Array.Empty()], - ["Serialization/TestData/Map/map_with_flippingflags/map-with-flippingflags", (string f) => MapWithFlippingFlags(f), Array.Empty()], - ["Serialization/TestData/Map/map_external_tileset_multi/map-external-tileset-multi", (string f) => MapExternalTilesetMulti(f), Array.Empty()], - ["Serialization/TestData/Map/map_external_tileset_wangset/map-external-tileset-wangset", (string f) => MapExternalTilesetWangset(f), Array.Empty()], - ["Serialization/TestData/Map/map_with_many_layers/map-with-many-layers", (string f) => MapWithManyLayers(f), Array.Empty()], - ["Serialization/TestData/Map/map_with_deep_props/map-with-deep-props", (string f) => MapWithDeepProps(), MapWithDeepPropsCustomTypeDefinitions()], - ["Serialization/TestData/Map/map_with_class/map-with-class", (string f) => MapWithClass(), MapWithClassCustomTypeDefinitions()], - ["Serialization/TestData/Map/map_with_class_and_props/map-with-class-and-props", (string f) => MapWithClassAndProps(), MapWithClassAndPropsCustomTypeDefinitions()], - ]; -} diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs b/src/DotTiled.Tests/TestData/Maps/default-map/default-map.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs rename to src/DotTiled.Tests/TestData/Maps/default-map/default-map.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmj b/src/DotTiled.Tests/TestData/Maps/default-map/default-map.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmj rename to src/DotTiled.Tests/TestData/Maps/default-map/default-map.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmx b/src/DotTiled.Tests/TestData/Maps/default-map/default-map.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmx rename to src/DotTiled.Tests/TestData/Maps/default-map/default-map.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.cs b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/map-external-tileset-multi.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.cs rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/map-external-tileset-multi.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.tmj b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/map-external-tileset-multi.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.tmj rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/map-external-tileset-multi.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.tmx b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/map-external-tileset-multi.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.tmx rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/map-external-tileset-multi.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/multi-tileset.tsj b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/multi-tileset.tsj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/multi-tileset.tsj rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/multi-tileset.tsj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/multi-tileset.tsx b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/multi-tileset.tsx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/multi-tileset.tsx rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/multi-tileset.tsx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/tileset.png b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/tileset.png similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/tileset.png rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-multi/tileset.png diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.cs b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/map-external-tileset-wangset.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.cs rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/map-external-tileset-wangset.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.tmj b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/map-external-tileset-wangset.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.tmj rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/map-external-tileset-wangset.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.tmx b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/map-external-tileset-wangset.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.tmx rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/map-external-tileset-wangset.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/tileset.png b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/tileset.png similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/tileset.png rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/tileset.png diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/wangset-tileset.tsj b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/wangset-tileset.tsj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/wangset-tileset.tsj rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/wangset-tileset.tsj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/wangset-tileset.tsx b/src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/wangset-tileset.tsx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/wangset-tileset.tsx rename to src/DotTiled.Tests/TestData/Maps/map-external-tileset-wangset/wangset-tileset.tsx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-class-and-props/map-with-class-and-props.cs b/src/DotTiled.Tests/TestData/Maps/map-with-class-and-props/map-with-class-and-props.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-class-and-props/map-with-class-and-props.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-class-and-props/map-with-class-and-props.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-class-and-props/map-with-class-and-props.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-class-and-props/map-with-class-and-props.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-class-and-props/map-with-class-and-props.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-class-and-props/map-with-class-and-props.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-class-and-props/map-with-class-and-props.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-class-and-props/map-with-class-and-props.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-class-and-props/map-with-class-and-props.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-class-and-props/map-with-class-and-props.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-class/map-with-class.cs b/src/DotTiled.Tests/TestData/Maps/map-with-class/map-with-class.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-class/map-with-class.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-class/map-with-class.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-class/map-with-class.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-class/map-with-class.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-class/map-with-class.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-class/map-with-class.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-class/map-with-class.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-class/map-with-class.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-class/map-with-class.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-class/map-with-class.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.cs b/src/DotTiled.Tests/TestData/Maps/map-with-common-props/map-with-common-props.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-common-props/map-with-common-props.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-common-props/map-with-common-props.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-common-props/map-with-common-props.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-common-props/map-with-common-props.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-common-props/map-with-common-props.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.cs b/src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/map-with-custom-type-props.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/map-with-custom-type-props.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/map-with-custom-type-props.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/map-with-custom-type-props.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/map-with-custom-type-props.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/map-with-custom-type-props.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/propertytypes.json b/src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/propertytypes.json similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/propertytypes.json rename to src/DotTiled.Tests/TestData/Maps/map-with-custom-type-props/propertytypes.json diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-deep-props/map-with-deep-props.cs b/src/DotTiled.Tests/TestData/Maps/map-with-deep-props/map-with-deep-props.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-deep-props/map-with-deep-props.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-deep-props/map-with-deep-props.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-deep-props/map-with-deep-props.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-deep-props/map-with-deep-props.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-deep-props/map-with-deep-props.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-deep-props/map-with-deep-props.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-deep-props/map-with-deep-props.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-deep-props/map-with-deep-props.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-deep-props/map-with-deep-props.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-deep-props/map-with-deep-props.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.cs b/src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/map-with-embedded-tileset.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/map-with-embedded-tileset.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/map-with-embedded-tileset.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/map-with-embedded-tileset.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/map-with-embedded-tileset.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/map-with-embedded-tileset.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/tileset.png b/src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/tileset.png similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/tileset.png rename to src/DotTiled.Tests/TestData/Maps/map-with-embedded-tileset/tileset.png diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.cs b/src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/map-with-external-tileset.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/map-with-external-tileset.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/map-with-external-tileset.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/map-with-external-tileset.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/map-with-external-tileset.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/map-with-external-tileset.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/tileset.png b/src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/tileset.png similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/tileset.png rename to src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/tileset.png diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/tileset.tsj b/src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/tileset.tsj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/tileset.tsj rename to src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/tileset.tsj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/tileset.tsx b/src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/tileset.tsx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/tileset.tsx rename to src/DotTiled.Tests/TestData/Maps/map-with-external-tileset/tileset.tsx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.cs b/src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/map-with-flippingflags.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/map-with-flippingflags.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/map-with-flippingflags.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/map-with-flippingflags.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/map-with-flippingflags.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/map-with-flippingflags.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/tileset.png b/src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/tileset.png similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/tileset.png rename to src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/tileset.png diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/tileset.tsj b/src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/tileset.tsj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/tileset.tsj rename to src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/tileset.tsj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/tileset.tsx b/src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/tileset.tsx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/tileset.tsx rename to src/DotTiled.Tests/TestData/Maps/map-with-flippingflags/tileset.tsx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.cs b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/map-with-many-layers.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.cs rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/map-with-many-layers.cs diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.tmj b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/map-with-many-layers.tmj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.tmj rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/map-with-many-layers.tmj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.tmx b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/map-with-many-layers.tmx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.tmx rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/map-with-many-layers.tmx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/poly.tj b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/poly.tj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/poly.tj rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/poly.tj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/poly.tx b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/poly.tx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/poly.tx rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/poly.tx diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/tileset.png b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/tileset.png similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/tileset.png rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/tileset.png diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/tileset.tsj b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/tileset.tsj similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/tileset.tsj rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/tileset.tsj diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/tileset.tsx b/src/DotTiled.Tests/TestData/Maps/map-with-many-layers/tileset.tsx similarity index 100% rename from src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/tileset.tsx rename to src/DotTiled.Tests/TestData/Maps/map-with-many-layers/tileset.tsx diff --git a/src/DotTiled.Tests/OptionalTests.cs b/src/DotTiled.Tests/UnitTests/OptionalTests.cs similarity index 100% rename from src/DotTiled.Tests/OptionalTests.cs rename to src/DotTiled.Tests/UnitTests/OptionalTests.cs diff --git a/src/DotTiled.Tests/Properties/CustomTypes/CustomClassDefinitionTests.cs b/src/DotTiled.Tests/UnitTests/Properties/CustomTypes/CustomClassDefinitionTests.cs similarity index 100% rename from src/DotTiled.Tests/Properties/CustomTypes/CustomClassDefinitionTests.cs rename to src/DotTiled.Tests/UnitTests/Properties/CustomTypes/CustomClassDefinitionTests.cs diff --git a/src/DotTiled.Tests/Properties/CustomTypes/CustomEnumDefinitionTests.cs b/src/DotTiled.Tests/UnitTests/Properties/CustomTypes/CustomEnumDefinitionTests.cs similarity index 100% rename from src/DotTiled.Tests/Properties/CustomTypes/CustomEnumDefinitionTests.cs rename to src/DotTiled.Tests/UnitTests/Properties/CustomTypes/CustomEnumDefinitionTests.cs diff --git a/src/DotTiled.Tests/Properties/HasPropertiesBaseTests.cs b/src/DotTiled.Tests/UnitTests/Properties/HasPropertiesBaseTests.cs similarity index 100% rename from src/DotTiled.Tests/Properties/HasPropertiesBaseTests.cs rename to src/DotTiled.Tests/UnitTests/Properties/HasPropertiesBaseTests.cs diff --git a/src/DotTiled.Tests/Serialization/DefaultResourceCacheTests.cs b/src/DotTiled.Tests/UnitTests/Serialization/DefaultResourceCacheTests.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/DefaultResourceCacheTests.cs rename to src/DotTiled.Tests/UnitTests/Serialization/DefaultResourceCacheTests.cs diff --git a/src/DotTiled.Tests/Serialization/LoaderTests.cs b/src/DotTiled.Tests/UnitTests/Serialization/LoaderTests.cs similarity index 95% rename from src/DotTiled.Tests/Serialization/LoaderTests.cs rename to src/DotTiled.Tests/UnitTests/Serialization/LoaderTests.cs index 4706445..daf0733 100644 --- a/src/DotTiled.Tests/Serialization/LoaderTests.cs +++ b/src/DotTiled.Tests/UnitTests/Serialization/LoaderTests.cs @@ -1,5 +1,4 @@ using System.Numerics; -using System.Runtime.CompilerServices; using DotTiled.Serialization; using NSubstitute; @@ -245,15 +244,4 @@ public class LoaderTests // Assert resourceReader.DidNotReceive().Read("template.tx"); } - - private static string WhereAmI([CallerFilePath] string callerFilePath = "") => callerFilePath; - - [Fact] - public void Test1() - { - var basePath = Path.GetDirectoryName(WhereAmI())!; - var mapPath = Path.Combine(basePath, "TestData/Map/map-with-external-tileset/map-with-external-tileset.tmx"); - var loader = Loader.Default(); - loader.LoadMap(mapPath); - } } diff --git a/src/DotTiled.Tests/Serialization/MapReaderTests.cs b/src/DotTiled.Tests/UnitTests/Serialization/MapReaderTests.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/MapReaderTests.cs rename to src/DotTiled.Tests/UnitTests/Serialization/MapReaderTests.cs diff --git a/src/DotTiled.Tests/UnitTests/Serialization/TestData.cs b/src/DotTiled.Tests/UnitTests/Serialization/TestData.cs new file mode 100644 index 0000000..eb13942 --- /dev/null +++ b/src/DotTiled.Tests/UnitTests/Serialization/TestData.cs @@ -0,0 +1,49 @@ +using System.Xml; + +namespace DotTiled.Tests; + +public static partial class TestData +{ + public static XmlReader GetXmlReaderFor(string testDataFile) + { + var fullyQualifiedTestDataFile = $"DotTiled.Tests.{ConvertPathToAssemblyResourcePath(testDataFile)}"; + using var stream = typeof(TestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile) + ?? throw new ArgumentException($"Test data file '{fullyQualifiedTestDataFile}' not found"); + + using var stringReader = new StreamReader(stream); + var xml = stringReader.ReadToEnd(); + var xmlStringReader = new StringReader(xml); + return XmlReader.Create(xmlStringReader); + } + + public static string GetRawStringFor(string testDataFile) + { + var fullyQualifiedTestDataFile = $"DotTiled.Tests.{ConvertPathToAssemblyResourcePath(testDataFile)}"; + using var stream = typeof(TestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile) + ?? throw new ArgumentException($"Test data file '{fullyQualifiedTestDataFile}' not found"); + + using var stringReader = new StreamReader(stream); + return stringReader.ReadToEnd(); + } + + private static string ConvertPathToAssemblyResourcePath(string path) => + path.Replace("/", ".").Replace("\\", ".").Replace(" ", "_"); + + private static string GetMapPath(string mapName) => $"TestData/Maps/{mapName.Replace('-', '_')}/{mapName}"; + + public static IEnumerable MapTests => + [ + [GetMapPath("default-map"), (string f) => DefaultMap(), Array.Empty()], + [GetMapPath("map-with-common-props"), (string f) => MapWithCommonProps(), Array.Empty()], + [GetMapPath("map-with-custom-type-props"), (string f) => MapWithCustomTypeProps(), MapWithCustomTypePropsCustomTypeDefinitions()], + [GetMapPath("map-with-embedded-tileset"), (string f) => MapWithEmbeddedTileset(), Array.Empty()], + [GetMapPath("map-with-external-tileset"), (string f) => MapWithExternalTileset(f), Array.Empty()], + [GetMapPath("map-with-flippingflags"), (string f) => MapWithFlippingFlags(f), Array.Empty()], + [GetMapPath("map-external-tileset-multi"), (string f) => MapExternalTilesetMulti(f), Array.Empty()], + [GetMapPath("map-external-tileset-wangset"), (string f) => MapExternalTilesetWangset(f), Array.Empty()], + [GetMapPath("map-with-many-layers"), (string f) => MapWithManyLayers(f), Array.Empty()], + [GetMapPath("map-with-deep-props"), (string f) => MapWithDeepProps(), MapWithDeepPropsCustomTypeDefinitions()], + [GetMapPath("map-with-class"), (string f) => MapWithClass(), MapWithClassCustomTypeDefinitions()], + [GetMapPath("map-with-class-and-props"), (string f) => MapWithClassAndProps(), MapWithClassAndPropsCustomTypeDefinitions()], + ]; +} diff --git a/src/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs b/src/DotTiled.Tests/UnitTests/Serialization/Tmj/TmjMapReaderTests.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs rename to src/DotTiled.Tests/UnitTests/Serialization/Tmj/TmjMapReaderTests.cs diff --git a/src/DotTiled.Tests/Serialization/Tmx/TmxMapReaderTests.cs b/src/DotTiled.Tests/UnitTests/Serialization/Tmx/TmxMapReaderTests.cs similarity index 100% rename from src/DotTiled.Tests/Serialization/Tmx/TmxMapReaderTests.cs rename to src/DotTiled.Tests/UnitTests/Serialization/Tmx/TmxMapReaderTests.cs