AstridAnimatorProcessorTests.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.IO;
  3. using MonoGame.Extended.Content.Pipeline.Animations;
  4. using Xunit;
  5. namespace MonoGame.Extended.Content.Pipeline.Tests
  6. {
  7. public class AstridAnimatorProcessorTests
  8. {
  9. [Fact]
  10. public void AstridAnimatorProcessor_Process_Test()
  11. {
  12. var filePath = PathExtensions.GetApplicationFullPath("TestData", "astrid-animator.aa");
  13. var importer = new AstridAnimatorImporter();
  14. var importerResult = importer.Import(filePath, null);
  15. var processor = new AstridAnimatorProcessor();
  16. var result = processor.Process(importerResult, null);
  17. Assert.Equal("astrid-animator-atlas", result.TextureAtlasAssetName);
  18. Assert.Equal("TestData", Path.GetFileName(result.Directory));
  19. Assert.Equal(3, result.Frames.Count);
  20. Assert.Equal("appear_01", result.Frames[0]);
  21. Assert.Equal("appear_02", result.Frames[1]);
  22. Assert.Equal("die_01", result.Frames[2]);
  23. }
  24. }
  25. }