mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-29 23:58:34 +01:00
22 lines
624 B
C#
22 lines
624 B
C#
|
using System.Linq;
|
||
|
using Microsoft.Xna.Framework;
|
||
|
using MLEM.Data;
|
||
|
using MLEM.Data.Content;
|
||
|
using NUnit.Framework;
|
||
|
using Tests.Stub;
|
||
|
|
||
|
namespace Tests {
|
||
|
public class TestDataTextureAtlas {
|
||
|
|
||
|
[Test]
|
||
|
public void Test() {
|
||
|
var atlas = DataTextureAtlas.LoadAtlasData(null, new RawContentManager(new StubServices()), "Texture.atlas");
|
||
|
Assert.AreEqual(atlas.Regions.Count(), 5);
|
||
|
|
||
|
var table = atlas["LongTableUp"];
|
||
|
Assert.AreEqual(table.Area, new Rectangle(0, 32, 64, 48));
|
||
|
Assert.AreEqual(table.PivotPixels, new Vector2(16, 48 - 32));
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|