-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#52 - add support for null in should clause #80
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,29 @@ type ``be Null tests`` ()= | |
|
||
[<Test>] member test. | ||
``null should fail to not be Null`` ()= | ||
null |> should be Null | ||
shouldFail (fun () -> null |> should not' (be Null)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we save prev behavior for backward compatibility as well? null |> should be Null
null |> should be null There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. first 2 test of the test-class have exact same body, but different naming:
So they really test same thing. [<Test>] member test.
``null should be Null`` ()=
null |> should be Null
[<Test>] member test.
``null should fail to not be Null`` ()=
shouldFail (fun () -> null |> should not' (be Null)) So I guess there should be no backward-compatibility issues and now test body corresponds to the test name, just like similar test for NUnit |
||
|
||
[<Test>] member test. | ||
``non-null should fail to be Null`` ()= | ||
"something" |> should not' (be Null) | ||
``non-null should fail to be Null`` ()= | ||
shouldFail (fun () -> "something" |> should be Null) | ||
|
||
[<Test>] member test. | ||
``non-null should not be Null`` ()= | ||
"something" |> should not' (be Null) | ||
|
||
[<Test>] member test. | ||
``null should be null`` ()= | ||
null |> should be null | ||
|
||
[<Test>] member test. | ||
``null should fail to not be null`` ()= | ||
shouldFail (fun () -> null |> should not' (be null)) | ||
|
||
[<Test>] member test. | ||
``non-null should fail to be null`` ()= | ||
shouldFail (fun () -> "something" |> should be null) | ||
|
||
[<Test>] member test. | ||
``non-null should not be null`` ()= | ||
"something" |> should not' (be null) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we could move implementation of
not``and fix to
equalto
CustomMatchers.fs` file that should be linked from all projects and do not copy parse implementation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will try