Asserting only one thing in your test
Let us take a look at the following code:
// don't [<Test>] let ``username and password cannot be empty string`` () = // arrange let credentials = Credentials(System.String.Empty, System.String.Empty) // act let result = validate(credentials) // assert result |> should contain UserNameEmpty result |> should contain PasswordEmpty // do [<Test>] let ``username cannot be empty string`` () = // arrange let credentials = Credentials(System.String.Empty, "secret") // act let result = validate(credentials) // assert result |> should contain UserNameEmpty // do [<Test>] let ``password cannot be empty string`` () = // arrange let credentials = Credentials("user", System.String.Empty) // act let result = validate(credentials) // assert result |> should contain PasswordEmpty
Cohesion in your code means that the function will...