Created
October 21, 2019 04:52
-
-
Save IntegerMan/d0b997eb50d622277177622fed282926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<Fact>] | |
let ``Dog Should Eat Squirrel If Adjacent`` () = | |
// Arrange | |
let customSquirrel = {Pos=newPos 3 6; ActorKind = Squirrel false; IsActive = true} | |
let testState = buildTestState | |
let state: GameState = {testState with World = {testState.World with Squirrel = customSquirrel}} | |
// Act | |
let newState = simulateActors state getRandomNumber | |
// Assert | |
newState.World.Doggo.Pos |> should equal testState.World.Squirrel.Pos | |
newState.World.Squirrel.IsActive |> should equal false | |
newState.SimState |> should equal Lost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment