Can somebody show an example how to use Akka.Net Testkit with F# API? Both Akka.Net and F# are quite new to me so I don't know if it is even feasible or reasonable to write unit tests this way (F# API and Testkit). To be more specific, quite simply I don't know how to get access to Sys with F# API. This is what I got:
module SocketTests
open Xunit
open Akka.TestKit
open Akka.TestKit.Internal
open Akka.TestKit.Xunit2
open Akka.FSharp
type SocketTests() =
inherit Akka.TestKit.Xunit2.TestKit()
[<Fact>]
let Socket_should_change_to_connected_state_when_receiving_Connect() =
Ok, now I would need to get reference to Sys for spawning something and for the life of me I can't figure it out. :-(
Any help would be much appreciated
member
instead oflet
). Akka.FSharp doesn't have a dedicated testing API - if you need one you may use Akkling or just copy Akkling.TestKit helpers - it's a single file, minor type definition changes are necessary to make it working with Akka.FSharp.