Re-write tests to avoid ==>
This commit is contained in:
parent
4c22b27805
commit
f787c2aa4e
5 changed files with 73 additions and 61 deletions
25
NightLight.Core.Tests/ArbitraryInteractionLists.fs
Normal file
25
NightLight.Core.Tests/ArbitraryInteractionLists.fs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
module NightLight.Core.Tests.ArbitraryInteractionLists
|
||||
|
||||
open System
|
||||
open FsCheck.FSharp
|
||||
open NightLight.Core.Tests.InteractionListGenerators
|
||||
|
||||
let private isDay (time: DateTime) =
|
||||
time.TimeOfDay >= TimeSpan.FromHours 5.5
|
||||
&& time.TimeOfDay < TimeSpan.FromHours 20.5
|
||||
|
||||
type ArbitraryInteractionsListThatEndsDuringTheDay =
|
||||
static member InteractionsList() =
|
||||
ArbMap.defaults
|
||||
|> ArbMap.generate<DateTime>
|
||||
|> Gen.filter isDay
|
||||
|> Gen.bind genInteractionsListThatEndsAtTime
|
||||
|> Arb.fromGen
|
||||
|
||||
type ArbitraryInteractionsListThatEndsDuringTheNight =
|
||||
static member InteractionsList() =
|
||||
ArbMap.defaults
|
||||
|> ArbMap.generate<DateTime>
|
||||
|> Gen.filter (not << isDay)
|
||||
|> Gen.bind genInteractionsListThatEndsAtTime
|
||||
|> Arb.fromGen
|
||||
Loading…
Add table
Add a link
Reference in a new issue