diff --git a/DotTiled.Benchmark/Program.cs b/DotTiled.Benchmark/Program.cs
index 8397495..b432b7e 100644
--- a/DotTiled.Benchmark/Program.cs
+++ b/DotTiled.Benchmark/Program.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Immutable;
using System.Security.Cryptography;
using System.Text;
diff --git a/DotTiled.Tests/Serialization/TestData.cs b/DotTiled.Tests/Serialization/TestData.cs
index d31956f..9b3b13f 100644
--- a/DotTiled.Tests/Serialization/TestData.cs
+++ b/DotTiled.Tests/Serialization/TestData.cs
@@ -6,6 +6,8 @@ public static partial class TestData
{
public static XmlReader GetXmlReaderFor(string testDataFile)
{
+ var names = typeof(TestData).Assembly.GetManifestResourceNames();
+
var fullyQualifiedTestDataFile = $"DotTiled.Tests.{testDataFile}";
using var stream = typeof(TestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile)
?? throw new ArgumentException($"Test data file '{fullyQualifiedTestDataFile}' not found");
diff --git a/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs b/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs
new file mode 100644
index 0000000..44c909e
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs
@@ -0,0 +1,96 @@
+namespace DotTiled.Tests;
+
+public partial class TestData
+{
+ public static Map DefaultMap() => new Map
+ {
+ Class = "",
+ Orientation = MapOrientation.Orthogonal,
+ Width = 5,
+ Height = 5,
+ TileWidth = 32,
+ TileHeight = 32,
+ Infinite = false,
+ HexSideLength = null,
+ StaggerAxis = null,
+ StaggerIndex = null,
+ ParallaxOriginX = 0,
+ ParallaxOriginY = 0,
+ RenderOrder = RenderOrder.RightDown,
+ CompressionLevel = -1,
+ BackgroundColor = new Color { R = 0, G = 0, B = 0, A = 0 },
+ Version = "1.10",
+ TiledVersion = "1.11.0",
+ NextLayerID = 2,
+ NextObjectID = 1,
+ Layers = [
+ new TileLayer
+ {
+ ID = 1,
+ Name = "Tile Layer 1",
+ Width = 5,
+ Height = 5,
+ Data = new Data
+ {
+ Encoding = DataEncoding.Csv,
+ Chunks = null,
+ Compression = null,
+ GlobalTileIDs = [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ FlippingFlags = [
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None,
+ FlippingFlags.None
+ ]
+ }
+ }
+ ]
+ };
+}
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmj b/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmj
similarity index 100%
rename from DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmj
rename to DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmj
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmx b/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.tmx
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmj
deleted file mode 100644
index de94421..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmj
+++ /dev/null
@@ -1,30 +0,0 @@
-{ "compressionlevel":-1,
- "height":5,
- "infinite":false,
- "layers":[
- {
- "compression":"gzip",
- "data":"H4sIAAAAAAAACmNgoD0AAMrGiJlkAAAA",
- "encoding":"base64",
- "height":5,
- "id":1,
- "name":"Tile Layer 1",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- }],
- "nextlayerid":2,
- "nextobjectid":1,
- "orientation":"orthogonal",
- "renderorder":"right-down",
- "tiledversion":"1.11.0",
- "tileheight":32,
- "tilesets":[],
- "tilewidth":32,
- "type":"map",
- "version":"1.10",
- "width":5
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmx
deleted file mode 100644
index d3e0f29..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmx
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmj
deleted file mode 100644
index 4cf9e84..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmj
+++ /dev/null
@@ -1,30 +0,0 @@
-{ "compressionlevel":-1,
- "height":5,
- "infinite":false,
- "layers":[
- {
- "compression":"zlib",
- "data":"eJxjYKA9AAAAZAAB",
- "encoding":"base64",
- "height":5,
- "id":1,
- "name":"Tile Layer 1",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- }],
- "nextlayerid":2,
- "nextobjectid":1,
- "orientation":"orthogonal",
- "renderorder":"right-down",
- "tiledversion":"1.11.0",
- "tileheight":32,
- "tilesets":[],
- "tilewidth":32,
- "type":"map",
- "version":"1.10",
- "width":5
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmx
deleted file mode 100644
index d35b438..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmx
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmj
deleted file mode 100644
index b13707c..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmj
+++ /dev/null
@@ -1,30 +0,0 @@
-{ "compressionlevel":-1,
- "height":5,
- "infinite":false,
- "layers":[
- {
- "compression":"",
- "data":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
- "encoding":"base64",
- "height":5,
- "id":1,
- "name":"Tile Layer 1",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- }],
- "nextlayerid":2,
- "nextobjectid":1,
- "orientation":"orthogonal",
- "renderorder":"right-down",
- "tiledversion":"1.11.0",
- "tileheight":32,
- "tilesets":[],
- "tilewidth":32,
- "type":"map",
- "version":"1.10",
- "width":5
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmx
deleted file mode 100644
index 0e98f67..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmx
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.cs b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.cs
deleted file mode 100644
index 79df5a5..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-namespace DotTiled.Tests;
-
-public partial class TestData
-{
- public static Map EmptyMapWithProperties() => new Map
- {
- Version = "1.10",
- TiledVersion = "1.11.0",
- Orientation = MapOrientation.Orthogonal,
- RenderOrder = RenderOrder.RightDown,
- Width = 5,
- Height = 5,
- TileWidth = 32,
- TileHeight = 32,
- Infinite = false,
- NextLayerID = 2,
- NextObjectID = 1,
- Layers = [
- new TileLayer
- {
- ID = 1,
- Name = "Tile Layer 1",
- Width = 5,
- Height = 5,
- Data = new Data
- {
- Encoding = DataEncoding.Csv,
- GlobalTileIDs = [
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0
- ],
- FlippingFlags = [
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None
- ]
- }
- }
- ],
- Properties = new Dictionary
- {
- ["MapBool"] = new BoolProperty { Name = "MapBool", Value = true },
- ["MapColor"] = new ColorProperty { Name = "MapColor", Value = new Color { R = 255, G = 0, B = 0, A = 255 } },
- ["MapFile"] = new FileProperty { Name = "MapFile", Value = "file.png" },
- ["MapFloat"] = new FloatProperty { Name = "MapFloat", Value = 5.2f },
- ["MapInt"] = new IntProperty { Name = "MapInt", Value = 42 },
- ["MapObject"] = new ObjectProperty { Name = "MapObject", Value = 5 },
- ["MapString"] = new StringProperty { Name = "MapString", Value = "string in map" }
- }
- };
-}
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmj
deleted file mode 100644
index 237546d..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmj
+++ /dev/null
@@ -1,69 +0,0 @@
-{ "compressionlevel":-1,
- "height":5,
- "infinite":false,
- "layers":[
- {
- "data":[0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0],
- "height":5,
- "id":1,
- "name":"Tile Layer 1",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- }],
- "nextlayerid":2,
- "nextobjectid":1,
- "orientation":"orthogonal",
- "properties":[
- {
- "name":"MapBool",
- "type":"bool",
- "value":true
- },
- {
- "name":"MapColor",
- "type":"color",
- "value":"#ffff0000"
- },
- {
- "name":"MapFile",
- "type":"file",
- "value":"file.png"
- },
- {
- "name":"MapFloat",
- "type":"float",
- "value":5.2
- },
- {
- "name":"MapInt",
- "type":"int",
- "value":42
- },
-
- {
- "name":"MapObject",
- "type":"object",
- "value":5
- },
- {
- "name":"MapString",
- "type":"string",
- "value":"string in map"
- }],
- "renderorder":"right-down",
- "tiledversion":"1.11.0",
- "tileheight":32,
- "tilesets":[],
- "tilewidth":32,
- "type":"map",
- "version":"1.10",
- "width":5
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmx
deleted file mode 100644
index 5a14d94..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmx
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map.cs b/DotTiled.Tests/Serialization/TestData/Map/empty-map.cs
deleted file mode 100644
index b51aeba..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/empty-map.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-namespace DotTiled.Tests;
-
-public partial class TestData
-{
- public static Map EmptyMapWithEncodingAndCompression(DataEncoding dataEncoding, DataCompression? compression) => new Map
- {
- Version = "1.10",
- TiledVersion = "1.11.0",
- Orientation = MapOrientation.Orthogonal,
- RenderOrder = RenderOrder.RightDown,
- Width = 5,
- Height = 5,
- TileWidth = 32,
- TileHeight = 32,
- Infinite = false,
- NextLayerID = 2,
- NextObjectID = 1,
- Layers = [
- new TileLayer
- {
- ID = 1,
- Name = "Tile Layer 1",
- Width = 5,
- Height = 5,
- Data = new Data
- {
- Encoding = dataEncoding,
- Compression = compression,
- GlobalTileIDs = [
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0
- ],
- FlippingFlags = [
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None
- ]
- }
- }
- ]
- };
-}
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-group.cs b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.cs
deleted file mode 100644
index 14a2c8c..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/map-with-group.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-namespace DotTiled.Tests;
-
-public partial class TestData
-{
- public static Map MapWithGroup() => new Map
- {
- Version = "1.10",
- TiledVersion = "1.11.0",
- Orientation = MapOrientation.Orthogonal,
- RenderOrder = RenderOrder.RightDown,
- Width = 5,
- Height = 5,
- TileWidth = 32,
- TileHeight = 32,
- Infinite = false,
- NextLayerID = 5,
- NextObjectID = 2,
- Layers = [
- new TileLayer
- {
- ID = 4,
- Name = "Tile Layer 2",
- Width = 5,
- Height = 5,
- Data = new Data
- {
- Encoding = DataEncoding.Csv,
- GlobalTileIDs = [
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0
- ],
- FlippingFlags = [
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None
- ]
- }
- },
- new Group
- {
- ID = 3,
- Name = "Group 1",
- Layers = [
- new TileLayer
- {
- ID = 1,
- Name = "Tile Layer 1",
- Width = 5,
- Height = 5,
- Data = new Data
- {
- Encoding = DataEncoding.Csv,
- GlobalTileIDs = [
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0
- ],
- FlippingFlags = [
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None
- ]
- }
- },
- new ObjectLayer
- {
- ID = 2,
- Name = "Object Layer 1",
- Objects = [
- new RectangleObject
- {
- ID = 1,
- Name = "Name",
- X = 35.5f,
- Y = 26,
- Width = 64.5f,
- Height = 64.5f,
- }
- ]
- }
- ]
- }
- ]
- };
-}
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmj b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmj
deleted file mode 100644
index 6bce8c8..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmj
+++ /dev/null
@@ -1,80 +0,0 @@
-{ "compressionlevel":-1,
- "height":5,
- "infinite":false,
- "layers":[
- {
- "data":[0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0],
- "height":5,
- "id":4,
- "name":"Tile Layer 2",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- },
- {
- "id":3,
- "layers":[
- {
- "data":[0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0],
- "height":5,
- "id":1,
- "name":"Tile Layer 1",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "id":2,
- "name":"Object Layer 1",
- "objects":[
- {
- "height":64.5,
- "id":1,
- "name":"Name",
- "rotation":0,
- "type":"",
- "visible":true,
- "width":64.5,
- "x":35.5,
- "y":26
- }],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- }],
- "name":"Group 1",
- "opacity":1,
- "type":"group",
- "visible":true,
- "x":0,
- "y":0
- }],
- "nextlayerid":5,
- "nextobjectid":2,
- "orientation":"orthogonal",
- "renderorder":"right-down",
- "tiledversion":"1.11.0",
- "tileheight":32,
- "tilesets":[],
- "tilewidth":32,
- "type":"map",
- "version":"1.10",
- "width":5
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmx b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmx
deleted file mode 100644
index 61191c4..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmx
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.cs b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.cs
deleted file mode 100644
index 1f9cb1c..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-namespace DotTiled.Tests;
-
-public partial class TestData
-{
- public static Map MapWithObjectTemplate(string templateExtension) => new Map
- {
- Version = "1.10",
- TiledVersion = "1.11.0",
- Orientation = MapOrientation.Orthogonal,
- RenderOrder = RenderOrder.RightDown,
- Width = 5,
- Height = 5,
- TileWidth = 32,
- TileHeight = 32,
- Infinite = false,
- NextLayerID = 3,
- NextObjectID = 3,
- Layers = [
- new TileLayer
- {
- ID = 1,
- Name = "Tile Layer 1",
- Width = 5,
- Height = 5,
- Data = new Data
- {
- Encoding = DataEncoding.Csv,
- GlobalTileIDs = [
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0,
- 0,0,0,0,0
- ],
- FlippingFlags = [
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None
- ]
- }
- },
- new ObjectLayer
- {
- ID = 2,
- Name = "Object Layer 1",
- Objects = [
- new RectangleObject
- {
- ID = 1,
- Template = $"map-with-object-template.{templateExtension}",
- Name = "Thingy 2",
- X = 94.5749f,
- Y = 33.6842f,
- Width = 37.0156f,
- Height = 37.0156f,
- Properties = new Dictionary
- {
- ["Bool"] = new BoolProperty { Name = "Bool", Value = true },
- ["TestClassInTemplate"] = new ClassProperty
- {
- Name = "TestClassInTemplate",
- PropertyType = "TestClass",
- Properties = new Dictionary
- {
- ["Amount"] = new FloatProperty { Name = "Amount", Value = 37 },
- ["Name"] = new StringProperty { Name = "Name", Value = "I am here" }
- }
- }
- }
- },
- new RectangleObject
- {
- ID = 2,
- Template = $"map-with-object-template.{templateExtension}",
- Name = "Thingy",
- X = 29.7976f,
- Y = 33.8693f,
- Width = 37.0156f,
- Height = 37.0156f,
- Properties = new Dictionary
- {
- ["Bool"] = new BoolProperty { Name = "Bool", Value = true },
- ["TestClassInTemplate"] = new ClassProperty
- {
- Name = "TestClassInTemplate",
- PropertyType = "TestClass",
- Properties = new Dictionary
- {
- ["Amount"] = new FloatProperty { Name = "Amount", Value = 4.2f },
- ["Name"] = new StringProperty { Name = "Name", Value = "Hello there" }
- }
- }
- }
- },
- new RectangleObject
- {
- ID = 3,
- Template = $"map-with-object-template.{templateExtension}",
- Name = "Thingy 3",
- X = 5,
- Y = 5,
- Width = 37.0156f,
- Height = 37.0156f,
- Properties = new Dictionary
- {
- ["Bool"] = new BoolProperty { Name = "Bool", Value = true },
- ["TestClassInTemplate"] = new ClassProperty
- {
- Name = "TestClassInTemplate",
- PropertyType = "TestClass",
- Properties = new Dictionary
- {
- ["Amount"] = new FloatProperty { Name = "Amount", Value = 0.0f },
- ["Name"] = new StringProperty { Name = "Name", Value = "I am here 3" }
- }
- }
- }
- }
- ]
- }
- ]
- };
-}
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmj b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmj
deleted file mode 100644
index 398403b..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmj
+++ /dev/null
@@ -1,104 +0,0 @@
-{ "compressionlevel":-1,
- "height":5,
- "infinite":false,
- "layers":[
- {
- "data":[0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0],
- "height":5,
- "id":1,
- "name":"Tile Layer 1",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- },
- {
- "draworder":"topdown",
- "id":2,
- "name":"Object Layer 1",
- "objects":[
- {
- "height":37.0156,
- "id":1,
- "template":"map-with-object-template.tj",
- "name":"Thingy 2",
- "properties":[
- {
- "name":"Bool",
- "type":"bool",
- "value":true
- },
- {
- "name":"TestClassInTemplate",
- "propertytype":"TestClass",
- "type":"class",
- "value":
- {
- "Amount":37,
- "Name":"I am here"
- }
- }],
- "rotation":0,
- "type":"",
- "visible":true,
- "width":37.0156,
- "x":94.5749,
- "y":33.6842
- },
- {
- "id":2,
- "template":"map-with-object-template.tj",
- "x":29.7976,
- "y":33.8693
- },
- {
- "height":37.0156,
- "id":3,
- "template":"map-with-object-template.tj",
- "name":"Thingy 3",
- "properties":[
- {
- "name":"Bool",
- "type":"bool",
- "value":true
- },
- {
- "name":"TestClassInTemplate",
- "propertytype":"TestClass",
- "type":"class",
- "value":
- {
- "Name":"I am here 3"
- }
- }],
- "rotation":0,
- "type":"",
- "visible":true,
- "width":37.0156,
- "x":5,
- "y":5
- }],
- "opacity":1,
- "type":"objectgroup",
- "visible":true,
- "x":0,
- "y":0
- }],
- "nextlayerid":3,
- "nextobjectid":3,
- "orientation":"orthogonal",
- "renderorder":"right-down",
- "tiledversion":"1.11.0",
- "tileheight":32,
- "tilesets":[],
- "tilewidth":32,
- "type":"map",
- "version":"1.10",
- "width":5
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmx b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmx
deleted file mode 100644
index 83716a0..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmx
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
diff --git a/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.cs b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.cs
deleted file mode 100644
index d6a5f10..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-namespace DotTiled.Tests;
-
-public partial class TestData
-{
- public static Map SimpleMapWithEmbeddedTileset() => new Map
- {
- Version = "1.10",
- TiledVersion = "1.11.0",
- Orientation = MapOrientation.Orthogonal,
- RenderOrder = RenderOrder.RightDown,
- Width = 5,
- Height = 5,
- TileWidth = 32,
- TileHeight = 32,
- Infinite = false,
- NextLayerID = 2,
- NextObjectID = 1,
- Tilesets = [
- new Tileset
- {
- FirstGID = 1,
- Name = "Tileset 1",
- TileWidth = 32,
- TileHeight = 32,
- TileCount = 8,
- Columns = 4,
- Image = new Image
- {
- Format = ImageFormat.Png,
- Source = "tiles.png",
- Width = 128,
- Height = 64
- }
- }
- ],
- Layers = [
- new TileLayer
- {
- ID = 1,
- Name = "Tile Layer 1",
- Width = 5,
- Height = 5,
- Data = new Data
- {
- Encoding = DataEncoding.Csv,
- Compression = null,
- GlobalTileIDs = [
- 1,1,1,1,1,
- 1,1,1,1,1,
- 1,1,1,1,1,
- 2,2,2,2,2,
- 2,2,2,2,2
- ],
- FlippingFlags = [
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None,
- FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None, FlippingFlags.None
- ]
- },
- }
- ]
- };
-}
diff --git a/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmj b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmj
deleted file mode 100644
index fa5a4ef..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmj
+++ /dev/null
@@ -1,45 +0,0 @@
-{ "compressionlevel":-1,
- "height":5,
- "infinite":false,
- "layers":[
- {
- "data":[1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2],
- "height":5,
- "id":1,
- "name":"Tile Layer 1",
- "opacity":1,
- "type":"tilelayer",
- "visible":true,
- "width":5,
- "x":0,
- "y":0
- }],
- "nextlayerid":2,
- "nextobjectid":1,
- "orientation":"orthogonal",
- "renderorder":"right-down",
- "tiledversion":"1.11.0",
- "tileheight":32,
- "tilesets":[
- {
- "columns":4,
- "firstgid":1,
- "image":"tiles.png",
- "imageheight":64,
- "imagewidth":128,
- "margin":0,
- "name":"Tileset 1",
- "spacing":0,
- "tilecount":8,
- "tileheight":32,
- "tilewidth":32
- }],
- "tilewidth":32,
- "type":"map",
- "version":"1.10",
- "width":5
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmx b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmx
deleted file mode 100644
index 3d91b9d..0000000
--- a/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmx
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
diff --git a/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tj b/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tj
deleted file mode 100644
index ec2b065..0000000
--- a/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tj
+++ /dev/null
@@ -1,28 +0,0 @@
-{ "object":
- {
- "height":37.0156,
- "id":2,
- "name":"Thingy",
- "properties":[
- {
- "name":"Bool",
- "type":"bool",
- "value":true
- },
- {
- "name":"TestClassInTemplate",
- "propertytype":"TestClass",
- "type":"class",
- "value":
- {
- "Amount":4.2,
- "Name":"Hello there"
- }
- }],
- "rotation":0,
- "type":"",
- "visible":true,
- "width":37.0156
- },
- "type":"template"
-}
\ No newline at end of file
diff --git a/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tx b/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tx
deleted file mode 100644
index 3039be2..0000000
--- a/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tx
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
diff --git a/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs b/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
index 7e220a9..e04423b 100644
--- a/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
+++ b/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
@@ -2,44 +2,9 @@ namespace DotTiled.Tests;
public partial class TmjMapReaderTests
{
- public static IEnumerable