mirror of
https://github.com/dcronqvist/DotTiled.git
synced 2025-05-09 02:06:02 +03:00
Make custom types optional
This commit is contained in:
parent
67876c6532
commit
8c9068cc97
21 changed files with 189 additions and 59 deletions
|
@ -246,7 +246,7 @@ public class LoaderTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void LoadMap_MapHasClassAndLoaderHasNoCustomTypes_ThrowsException()
|
||||
public void LoadMap_MapHasClassAndLoaderHasNoCustomTypes_ReturnsMapWithEmptyProperties()
|
||||
{
|
||||
// Arrange
|
||||
var resourceReader = Substitute.For<IResourceReader>();
|
||||
|
@ -270,8 +270,11 @@ public class LoaderTests
|
|||
var customTypeDefinitions = Enumerable.Empty<ICustomTypeDefinition>();
|
||||
var loader = new Loader(resourceReader, resourceCache, customTypeDefinitions);
|
||||
|
||||
// Act & Assert
|
||||
Assert.Throws<KeyNotFoundException>(() => loader.LoadMap("map.tmx"));
|
||||
// Act
|
||||
var result = loader.LoadMap("map.tmx");
|
||||
|
||||
// Assert
|
||||
DotTiledAssert.AssertProperties([], result.Properties);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue