Beispiel #1
0
 public void quadrant_with_zero_zero_position_returns_exception()
 {
     Assert.Throws <Exception>(() =>
     {
         Quadrant.Create()
         .SetPosition(0, 0)
         .SetTerrain(Enums.Terrain.Rock)
         .Build();
     });
 }
Beispiel #2
0
        public void quadrant_with_non_zero_zero_position_returns_build_correctly()
        {
            var quadrant = Quadrant.Create()
                           .SetPosition(1, 1)
                           .SetTerrain(Enums.Terrain.Rock)
                           .Build();

            Assert.True(quadrant.GetPoint().GetX() == 1);
            Assert.True(quadrant.GetPoint().GetY() == 1);
            Assert.True(quadrant.GetObject() != null && quadrant.GetObject() is Rock);
        }