TilemapPointObjectTests.cs 706 B

123456789101112131415161718192021222324252627282930
  1. using Microsoft.Xna.Framework;
  2. using MonoGame.Extended.Tilemaps;
  3. namespace MonoGame.Extended.Tests;
  4. public sealed class TilemapPointObjectTests
  5. {
  6. [Fact]
  7. public void Constructor_SetsProperties()
  8. {
  9. var obj = new PointObject(1, new Vector2(10, 20));
  10. Assert.Equal(1, obj.Id);
  11. Assert.Equal(new Vector2(10, 20), obj.Position);
  12. }
  13. [Fact]
  14. public void Bounds_ReturnsZeroSizeAtPosition()
  15. {
  16. var obj = new PointObject(1, new Vector2(10, 20));
  17. var bounds = obj.Bounds;
  18. // Assert
  19. Assert.Equal(10, bounds.X);
  20. Assert.Equal(20, bounds.Y);
  21. Assert.Equal(0, bounds.Width);
  22. Assert.Equal(0, bounds.Height);
  23. }
  24. }