Fsunit returns runtime generated actual value

54 Views Asked by At

We are using F# for our HTTP calls automation tests and I stumbled upon one runtime error from FsUnit that I am not sure I understand, I admit I wrote F# only 2 times in my life therefore this might be stupid question but bear with me.

This is the test:

[<Test>]
[<AsyncStateMachine(typeof<Task>)>]
member x.``When all dependent microservices and kafka are up and running service should be healty``() = toTask <| async {
    let! responseContent = Http.AsyncRequestString(url = config.ApiHost + "/BetsReportingApiModule/healthcheck")
    let expectedIsAlive = JsonValue.Parse(responseContent).GetProperty("alive").AsBoolean
    return  expectedIsAlive |> should be True
}

And this is the error message:

Message: Expected: True But was: << StartupCode$SBTech-BetsReportingAPI-AutomationTests>.$HttpApiTests+expectedIsAlive@1689>

I can guess that this is some runtime generated string but I am not sure what is the cause if it.

0

There are 0 best solutions below

Related Questions in F#