Adding more tests

This commit is contained in:
ceikry 2022-04-26 20:34:14 -05:00
parent 14fd14659c
commit e8b8621cc6
2 changed files with 8 additions and 2 deletions

View file

@ -776,7 +776,7 @@ public final class HouseManager {
* Gets the region.
* @return The region.
*/
public Region getRegion() {
public DynamicRegion getRegion() {
return region;
}

View file

@ -29,12 +29,18 @@ class HouseManagerTests {
Assertions.assertEquals(true, RegionManager.forId(newManager.region.id) == newManager.region)
}
@Test fun constructShouldSetTheRegion() {
@Test fun constructShouldSetTheRegionInTheHouseManager() {
val newManager = HouseManager()
newManager.construct()
Assertions.assertNotEquals(null, newManager.region)
}
@Test fun constructShouldSetTheRegionBorders() {
val newManager = HouseManager()
newManager.construct()
Assertions.assertNotEquals(null, newManager.region.borders)
}
@Test fun createShouldPlaceGardenInRooms() {
manager.createNewHouseAt(HouseLocation.RIMMINGTON)
Assertions.assertEquals(true, manager.hasRoomAt(0, 4, 3))