Skip to content

Commit

Permalink
Add test to verify that this is true
Browse files Browse the repository at this point in the history
  • Loading branch information
marner2 authored and TysonMN committed Oct 16, 2022
1 parent f5375a8 commit cc0bb26
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Elmish.WPF.Tests/BindingVmHelpersTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ let name = "name"
let noGetSelectedItemCall _ = failwith "Should not call get selected item"


module Initialize =

[<Fact>]
let ``Initialize doesn't call getCurrentModel`` () =
let binding =
BindingData.OneWay.id<string, string>
|> BindingData.addValidation List.singleton

let vmBinding =
Initialize(LoggingViewModelArgs.none, name, noGetSelectedItemCall)
.Recursive("", ignore, (fun _ -> failwith "Should not call getCurrentModel on initialize"), binding)

test <@ vmBinding.IsSome @>

module Get =

let check<'a when 'a : equality> (g: Gen<'a>) =
Expand Down

0 comments on commit cc0bb26

Please sign in to comment.