Last active
October 21, 2019 05:24
-
-
Save IntegerMan/e3155a63596cfd18bbf1cb619f4202db 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 ``Simulating actors should decrease the turns left counter`` () = | |
// Arrange | |
let initialState = buildTestState | |
// Act | |
let newState = simulateActors initialState getRandomNumber | |
// Assert | |
newState.TurnsLeft |> should equal (initialState.TurnsLeft - 1) | |
[<Fact>] | |
let ``Running out of turns should lose the simulation`` () = | |
// Arrange | |
let state: GameState = {buildTestState with TurnsLeft = 0} | |
// Act | |
let newState = simulateActors state getRandomNumber | |
// Assert | |
newState.SimState |> should equal Lost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment