Let, say, a class
type ThisClassIsComplicated () =
let calculateSomething a b =
a + b
In this case calculateSomething, it is trivial, but if it will be more difficult, it makes sense to verify that the calculations made there are correct.
It might make sense to use a unit testing system to verify that private methods.
My question is: how is unit test private methods in F #?
Some random thoughts:
The selected answer here suggests using an attribute, InternalsVisibleTowhich in any case only applies to internalmethods .
What is the F #-specific route, if any? Is this better in F # design?
let calculateSomething a b = a + b
type ThisClassIsComplicated () =
member this.Calculate a b = calculateSomething a b
Perhaps the area calculateSomethingmay even be narrowed if a nested module .