mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-13 22:45:57 -06:00
Adding more tests
This commit is contained in:
parent
45980f5823
commit
4f043d217c
1 changed files with 19 additions and 0 deletions
|
|
@ -55,6 +55,25 @@ class HouseManagerTests {
|
|||
for (obj in objs) Assertions.assertEquals(null, obj)
|
||||
}
|
||||
|
||||
@Test fun leaveShouldPlaceThePlayerAtTheHouseLocationExitLocation() {
|
||||
val newManager = HouseManager()
|
||||
val newPlayer = TestUtils.getMockPlayer("test3")
|
||||
newManager.construct()
|
||||
newManager.enter(newPlayer, false)
|
||||
TestUtils.advanceTicks(5)
|
||||
HouseManager.leave(newPlayer)
|
||||
Assertions.assertEquals(newManager.location.exitLocation, newPlayer.location)
|
||||
}
|
||||
|
||||
@Test fun toggleBuildingModeShouldChangeBuildingMode() {
|
||||
val newManager = HouseManager()
|
||||
val newPlayer = TestUtils.getMockPlayer("test4")
|
||||
newManager.enter(newPlayer, false)
|
||||
TestUtils.advanceTicks(5)
|
||||
newManager.toggleBuildingMode(newPlayer, true)
|
||||
Assertions.assertEquals(true, newManager.isBuildingMode)
|
||||
}
|
||||
|
||||
@Test fun createShouldPlaceGardenInRooms() {
|
||||
manager.createNewHouseAt(HouseLocation.RIMMINGTON)
|
||||
Assertions.assertEquals(true, manager.hasRoomAt(0, 4, 3))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue