diff --git a/DotTiled.Tests/Assert/AssertMap.cs b/DotTiled.Tests/Assert/AssertMap.cs
index 167d0ad..e831063 100644
--- a/DotTiled.Tests/Assert/AssertMap.cs
+++ b/DotTiled.Tests/Assert/AssertMap.cs
@@ -30,11 +30,11 @@ public static partial class DotTiledAssert
Assert.NotNull(actual.Tilesets);
Assert.Equal(expected.Tilesets.Count, actual.Tilesets.Count);
for (var i = 0; i < expected.Tilesets.Count; i++)
- AssertTileset(actual.Tilesets[i], expected.Tilesets[i]);
+ AssertTileset(expected.Tilesets[i], actual.Tilesets[i]);
Assert.NotNull(actual.Layers);
Assert.Equal(expected.Layers.Count, actual.Layers.Count);
for (var i = 0; i < expected.Layers.Count; i++)
- AssertLayer(actual.Layers[i], expected.Layers[i]);
+ AssertLayer(expected.Layers[i], actual.Layers[i]);
}
}
diff --git a/DotTiled.Tests/DotTiled.Tests.csproj b/DotTiled.Tests/DotTiled.Tests.csproj
index 5e36559..faa22d4 100644
--- a/DotTiled.Tests/DotTiled.Tests.csproj
+++ b/DotTiled.Tests/DotTiled.Tests.csproj
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/DotTiled.Tests/Serialization/Tmx/TestData/TestData.cs b/DotTiled.Tests/Serialization/TestData.cs
similarity index 75%
rename from DotTiled.Tests/Serialization/Tmx/TestData/TestData.cs
rename to DotTiled.Tests/Serialization/TestData.cs
index 667fec0..d31956f 100644
--- a/DotTiled.Tests/Serialization/Tmx/TestData/TestData.cs
+++ b/DotTiled.Tests/Serialization/TestData.cs
@@ -2,12 +2,12 @@ using System.Xml;
namespace DotTiled.Tests;
-public static class TmxMapReaderTestData
+public static partial class TestData
{
public static XmlReader GetXmlReaderFor(string testDataFile)
{
var fullyQualifiedTestDataFile = $"DotTiled.Tests.{testDataFile}";
- using var stream = typeof(TmxMapReaderTestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile)
+ using var stream = typeof(TestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile)
?? throw new ArgumentException($"Test data file '{fullyQualifiedTestDataFile}' not found");
using var stringReader = new StreamReader(stream);
@@ -19,7 +19,7 @@ public static class TmxMapReaderTestData
public static string GetRawStringFor(string testDataFile)
{
var fullyQualifiedTestDataFile = $"DotTiled.Tests.{testDataFile}";
- using var stream = typeof(TmxMapReaderTestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile)
+ using var stream = typeof(TestData).Assembly.GetManifestResourceStream(fullyQualifiedTestDataFile)
?? throw new ArgumentException($"Test data file '{fullyQualifiedTestDataFile}' not found");
using var stringReader = new StreamReader(stream);
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmj
new file mode 100644
index 0000000..de94421
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmj
@@ -0,0 +1,30 @@
+{ "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/Tmx/TestData/Map/empty-map-base64-gzip.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-base64-gzip.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-gzip.tmx
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmj
new file mode 100644
index 0000000..4cf9e84
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmj
@@ -0,0 +1,30 @@
+{ "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/Tmx/TestData/Map/empty-map-base64-zlib.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-base64-zlib.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/empty-map-base64-zlib.tmx
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmj
new file mode 100644
index 0000000..b13707c
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmj
@@ -0,0 +1,30 @@
+{ "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/Tmx/TestData/Map/empty-map-base64.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-base64.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/empty-map-base64.tmx
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmj
new file mode 100644
index 0000000..896df6c
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmj
@@ -0,0 +1,32 @@
+{ "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",
+ "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/Tmx/TestData/Map/empty-map-csv.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-csv.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/empty-map-csv.tmx
diff --git a/DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-properties.cs b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.cs
similarity index 95%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-properties.cs
rename to DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.cs
index 795b920..79df5a5 100644
--- a/DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-properties.cs
+++ b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.cs
@@ -1,8 +1,8 @@
namespace DotTiled.Tests;
-public partial class TmxMapReaderTests
+public partial class TestData
{
- private static Map EmptyMapWithProperties() => new Map
+ public static Map EmptyMapWithProperties() => new Map
{
Version = "1.10",
TiledVersion = "1.11.0",
diff --git a/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmj b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmj
new file mode 100644
index 0000000..237546d
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmj
@@ -0,0 +1,69 @@
+{ "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/Tmx/TestData/Map/empty-map-properties.tmx b/DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map-properties.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/empty-map-properties.tmx
diff --git a/DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map.cs b/DotTiled.Tests/Serialization/TestData/Map/empty-map.cs
similarity index 89%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map.cs
rename to DotTiled.Tests/Serialization/TestData/Map/empty-map.cs
index 12cfc00..b51aeba 100644
--- a/DotTiled.Tests/Serialization/Tmx/TestData/Map/empty-map.cs
+++ b/DotTiled.Tests/Serialization/TestData/Map/empty-map.cs
@@ -1,8 +1,8 @@
namespace DotTiled.Tests;
-public partial class TmxMapReaderTests
+public partial class TestData
{
- private static Map EmptyMapWithEncodingAndCompression(DataEncoding dataEncoding, DataCompression? compression) => new Map
+ public static Map EmptyMapWithEncodingAndCompression(DataEncoding dataEncoding, DataCompression? compression) => new Map
{
Version = "1.10",
TiledVersion = "1.11.0",
diff --git a/DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-group.cs b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.cs
similarity index 97%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-group.cs
rename to DotTiled.Tests/Serialization/TestData/Map/map-with-group.cs
index 515312e..14a2c8c 100644
--- a/DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-group.cs
+++ b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.cs
@@ -1,8 +1,8 @@
namespace DotTiled.Tests;
-public partial class TmxMapReaderTests
+public partial class TestData
{
- private static Map MapWithGroup() => new Map
+ public static Map MapWithGroup() => new Map
{
Version = "1.10",
TiledVersion = "1.11.0",
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmj b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmj
new file mode 100644
index 0000000..6bce8c8
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmj
@@ -0,0 +1,80 @@
+{ "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/Tmx/TestData/Map/map-with-group.tmx b/DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-group.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/map-with-group.tmx
diff --git a/DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-object-template.cs b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.cs
similarity index 97%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-object-template.cs
rename to DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.cs
index 8f4459e..26ddde8 100644
--- a/DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-object-template.cs
+++ b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.cs
@@ -1,8 +1,8 @@
namespace DotTiled.Tests;
-public partial class TmxMapReaderTests
+public partial class TestData
{
- private static Map MapWithObjectTemplate() => new Map
+ public static Map MapWithObjectTemplate() => new Map
{
Version = "1.10",
TiledVersion = "1.11.0",
diff --git a/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmj b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmj
new file mode 100644
index 0000000..398403b
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmj
@@ -0,0 +1,104 @@
+{ "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/Tmx/TestData/Map/map-with-object-template.tmx b/DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/map-with-object-template.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/map-with-object-template.tmx
diff --git a/DotTiled.Tests/Serialization/Tmx/TestData/Map/simple-tileset-embed.cs b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.cs
similarity index 92%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/simple-tileset-embed.cs
rename to DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.cs
index 7dfb740..d6a5f10 100644
--- a/DotTiled.Tests/Serialization/Tmx/TestData/Map/simple-tileset-embed.cs
+++ b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.cs
@@ -1,8 +1,8 @@
namespace DotTiled.Tests;
-public partial class TmxMapReaderTests
+public partial class TestData
{
- private static Map SimpleMapWithEmbeddedTileset() => new Map
+ public static Map SimpleMapWithEmbeddedTileset() => new Map
{
Version = "1.10",
TiledVersion = "1.11.0",
@@ -26,6 +26,7 @@ public partial class TmxMapReaderTests
Columns = 4,
Image = new Image
{
+ Format = ImageFormat.Png,
Source = "tiles.png",
Width = 128,
Height = 64
diff --git a/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmj b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmj
new file mode 100644
index 0000000..fa5a4ef
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmj
@@ -0,0 +1,45 @@
+{ "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/Tmx/TestData/Map/simple-tileset-embed.tmx b/DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Map/simple-tileset-embed.tmx
rename to DotTiled.Tests/Serialization/TestData/Map/simple-tileset-embed.tmx
diff --git a/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tj b/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tj
new file mode 100644
index 0000000..ec2b065
--- /dev/null
+++ b/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tj
@@ -0,0 +1,28 @@
+{ "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/Tmx/TestData/Template/map-with-object-template.tx b/DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tx
similarity index 100%
rename from DotTiled.Tests/Serialization/Tmx/TestData/Template/map-with-object-template.tx
rename to DotTiled.Tests/Serialization/TestData/Template/map-with-object-template.tx
diff --git a/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs b/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
index 7e15bac..605cda9 100644
--- a/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
+++ b/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
@@ -2,64 +2,75 @@ namespace DotTiled.Tests;
public partial class TmjMapReaderTests
{
- [Fact]
- public void Test1()
+ public static IEnumerable