mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-25 08:22:15 +00:00
Kni.Extended (#892)
* KNI projects * update actions fixes MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file. * remove test for issue #633 * build tests * KNI TypeReaders * KNI/XNA compatible code * GetRuntimeReader from runtime types * remove MockGameWindow
This commit is contained in:
@@ -22,28 +22,5 @@ namespace MonoGame.Extended.Tests.Content
|
||||
Assert.True(ContentReaderExtensions.ShortenRelativePath(input) == expectedoutput);
|
||||
}
|
||||
|
||||
// Test added for issue #633
|
||||
// https://github.com/craftworkgames/MonoGame.Extended/issues/633
|
||||
//
|
||||
// Issue states that the input string from a json file is parsed in correctly by the content reader.
|
||||
// Adding this test to ensure that GetRelativeAssetName is parsed correctly.
|
||||
[Theory]
|
||||
[InlineData("test.tex.png", "test.tex")]
|
||||
public void ContentReaderExtensions_GetRelativeAssetName(string input, string expected)
|
||||
{
|
||||
var contentReaderType = typeof(Microsoft.Xna.Framework.Content.ContentReader).GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic).First();
|
||||
var contentReader = (Microsoft.Xna.Framework.Content.ContentReader)contentReaderType.Invoke(new object[]
|
||||
{
|
||||
null, // manager: parameter
|
||||
new MemoryStream(), // stream: parameter
|
||||
$"{expected}.xnb", // assetName: parameter
|
||||
0, // version: parameter
|
||||
null // recordDisposableObject: parameter
|
||||
});
|
||||
|
||||
var actual = contentReader.GetRelativeAssetName(input);
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user