我正在尝试测试一个集合不包含使用FsUnit.Xunit的值。
open FsUnit.Xunit
[<Fact>]
let ``simple test`` () =
let xs = [ 1; 2; 3 ]
xs |> should contain 1
xs |> should not contain 99 // Not real code我也尝试过使用not'。
我该怎么写这个?
发布于 2020-07-28 16:44:24
您只需要将其括在括号中,因为它需要一个约束(而不是函数)。contain是一个函数,它需要一个值并返回一个约束。
xs |> should not' (contain 99) https://stackoverflow.com/questions/63138480
复制相似问题