mirror of
https://github.com/dcronqvist/DotTiled.git
synced 2025-05-09 02:36:03 +03:00
Tests are automatically created when populating the available test data
This commit is contained in:
parent
da5bf73ca0
commit
46d5127c72
3 changed files with 54 additions and 83 deletions
|
@ -27,4 +27,44 @@ public static partial class TestData
|
|||
using var stringReader = new StreamReader(stream);
|
||||
return stringReader.ReadToEnd();
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> MapsThatHaveTmxAndTmj =>
|
||||
[
|
||||
["Serialization.TestData.Map.default_map.default-map", TestData.DefaultMap(), Array.Empty<CustomTypeDefinition>()]
|
||||
];
|
||||
|
||||
private static CustomTypeDefinition[] typedefs = [
|
||||
new CustomClassDefinition
|
||||
{
|
||||
Name = "TestClass",
|
||||
ID = 1,
|
||||
UseAs = CustomClassUseAs.Property,
|
||||
Members = [
|
||||
new StringProperty
|
||||
{
|
||||
Name = "Name",
|
||||
Value = ""
|
||||
},
|
||||
new FloatProperty
|
||||
{
|
||||
Name = "Amount",
|
||||
Value = 0f
|
||||
}
|
||||
]
|
||||
},
|
||||
new CustomClassDefinition
|
||||
{
|
||||
Name = "Test",
|
||||
ID = 2,
|
||||
UseAs = CustomClassUseAs.All,
|
||||
Members = [
|
||||
new ClassProperty
|
||||
{
|
||||
Name = "Yep",
|
||||
PropertyType = "TestClass",
|
||||
Properties = []
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue