-
Notifications
You must be signed in to change notification settings - Fork 76
Readable assertion messages on failure. #155
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
Changes from all commits
b162092
54b8901
bb13605
480d9a1
01d9e6c
64b5d79
7f82cbe
e8ce9c3
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 |
|---|---|---|
| @@ -1,26 +1,33 @@ | ||
| namespace FsUnit.Test | ||
| open Microsoft.VisualStudio.TestTools.UnitTesting | ||
| open FsUnit.MsTest | ||
| open NHamcrest.Core | ||
|
|
||
| [<TestClass>] | ||
| type ``be greaterThan tests`` ()= | ||
|
|
||
| [<TestMethod>] member test. | ||
| ``11 should be greater than 10`` ()= | ||
| 11 |> should be (greaterThan 10) | ||
|
|
||
| [<TestMethod>] member test. | ||
| ``11.1 should be greater than 11.0`` ()= | ||
| ``11,1 should be greater than 11,0`` ()= | ||
|
Member
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. Why you replaced
Member
Author
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. This tests with
Member
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. in VS?
Member
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. I thought it already fixed microsoft/testfx#682
Member
Author
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. Yes, in VS 16.6.2.
Member
Author
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. I discovered that tests with period in their name are shown in a separate section within the test explorer.
Member
Author
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. |
||
| 11.1 |> should be (greaterThan 11.0) | ||
|
|
||
| [<TestMethod>] member test. | ||
| ``9 should not be greater than 10`` ()= | ||
| 9 |> should not' (be greaterThan 10) | ||
|
|
||
| [<TestMethod>] member test. | ||
| ``9.1 should not be greater than 9.2`` ()= | ||
| ``9,1 should not be greater than 9,2`` ()= | ||
| 9.1 |> should not' (be greaterThan 9.2) | ||
|
|
||
| [<TestMethod>] member test. | ||
| ``9.2 should not be greater than 9.2`` ()= | ||
| ``9,2 should not be greater than 9,2`` ()= | ||
| 9.2 |> should not' (be greaterThan 9.2) | ||
|
|
||
| [<TestMethod>] member test. | ||
| ``9,2 should not be greater than 9,2 but message should be equal`` ()= | ||
| (fun () -> 9.2 |> should be (greaterThan 9.2)) | ||
| |> fun f -> Assert.ThrowsException<AssertFailedException>(f) | ||
| |> fun e -> e.Message | ||
| |> should equal ("Greater than 9.2 was 9.2") | ||
Uh oh!
There was an error while loading. Please reload this page.