I am making tests for three functions that make same thing using different ways (with NUnit and FsUnit). I want to use TestCase so I would not have to copy/paste a lot of code. I have this as compilation error message: "This is not a valid constant expression or custom attribute value". Is there any ways to solve the problem?
Program.fs
let calculateEvenNumbersWithFilter = ...
let calculateEvenNumbersWithMap = ...
let calculateEvenNumbersWithFold = ...
Tests.fs
open FsUnit
open NUnit.Framework
open Program
[<TestCase(calculateEvenNumbersWithFilter)>]
[<TestCase(calculateEvenNumbersWithFold)>]
[<TestCase(calculateEvenNumbersWithMap)>]
let ``Smoke test`` (func) =
func [1;2;3;4] |> should equal 2