From acea7b2e728787a0d83bbf83c8c1f042d2c32e7e Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 3 Jun 2024 10:15:45 +0800 Subject: + plugins project --- .../TexturePackerJsonImporterProcessorTests.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Plugins/MonoGame.Extended/tests/MonoGame.Extended.Content.Pipeline.Tests/TexturePackerJsonImporterProcessorTests.cs (limited to 'Plugins/MonoGame.Extended/tests/MonoGame.Extended.Content.Pipeline.Tests/TexturePackerJsonImporterProcessorTests.cs') diff --git a/Plugins/MonoGame.Extended/tests/MonoGame.Extended.Content.Pipeline.Tests/TexturePackerJsonImporterProcessorTests.cs b/Plugins/MonoGame.Extended/tests/MonoGame.Extended.Content.Pipeline.Tests/TexturePackerJsonImporterProcessorTests.cs new file mode 100644 index 0000000..4172ee2 --- /dev/null +++ b/Plugins/MonoGame.Extended/tests/MonoGame.Extended.Content.Pipeline.Tests/TexturePackerJsonImporterProcessorTests.cs @@ -0,0 +1,33 @@ +using Microsoft.Xna.Framework.Content.Pipeline; +using MonoGame.Extended.Content.Pipeline.TextureAtlases; +using NSubstitute; +using Xunit; + +namespace MonoGame.Extended.Content.Pipeline.Tests +{ + + public class TexturePackerJsonImporterProcessorTests + { + [Fact] + public void TexturePackerJsonImporter_Import_Test() + { + var filePath = PathExtensions.GetApplicationFullPath(@"TestData/test-tileset.json"); + var importer = new TexturePackerJsonImporter(); + var data = importer.Import(filePath, Substitute.For()); + + Assert.NotNull(data); + } + + [Fact] + public void TexturePackerJsonImporter_Processor_Test() + { + var filePath = PathExtensions.GetApplicationFullPath(@"TestData/test-tileset.json"); + var importer = new TexturePackerJsonImporter(); + var input = importer.Import(filePath, Substitute.For()); + var processor = new TexturePackerProcessor(); + var output = processor.Process(input, Substitute.For()); + + Assert.NotNull(output); + } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0