| 123456789101112131415161718192021222324252627282930 |
- using Microsoft.Xna.Framework;
- using MonoGame.Extended.Tilemaps;
- namespace MonoGame.Extended.Tests;
- public sealed class TilemapPointObjectTests
- {
- [Fact]
- public void Constructor_SetsProperties()
- {
- var obj = new PointObject(1, new Vector2(10, 20));
- Assert.Equal(1, obj.Id);
- Assert.Equal(new Vector2(10, 20), obj.Position);
- }
- [Fact]
- public void Bounds_ReturnsZeroSizeAtPosition()
- {
- var obj = new PointObject(1, new Vector2(10, 20));
- var bounds = obj.Bounds;
- // Assert
- Assert.Equal(10, bounds.X);
- Assert.Equal(20, bounds.Y);
- Assert.Equal(0, bounds.Width);
- Assert.Equal(0, bounds.Height);
- }
- }
|