-
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
#52 - add support for null in should clause #80
Conversation
@@ -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 comment
The 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 comment
The 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:
- null should be Null
- null should fail to not be Null
So they really test same thing.
There is the same situation in be Null tests
for XUnit and MsTest.
If you take a loot at NUnit tests you'll see that first 2 tests are testing what is stated in their names:
[<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
PR is updated. Could you please review and provide feedback. As for back-compatibility: both PR has 3 commits - if this doesn't work for you, I'll create new PR with single commit |
@alex-bogomaz Could we close this PR? |
yes |
hi, please review this PR. it contains fix for issue #52.
Now
should be null
should work the same asshould be Null