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
Add Should().NotThrowAfter assertion for actions #942
Commits on Oct 8, 2018
-
This extends the NotThrow Action assertion by an overload which allows to specify a wait time. This asserts that the Action should stop throwing exceptions after the wait time has passed.
-
Rename NotThrow overload with wait time
The overload of NotThrow with waiting time is renamed to NotThrowAfter to emphasize its purpose.
Commits on Oct 12, 2018
-
Changes requested in review of NotThrowAfter
* Change waitTime and pollInterval to TimeSpan * Use Thread.Sleep instead of Task.Delay * Add better exception messages if waitTime or pollInterval are out of range * Add tests for invalid argument exceptions * Simplify tests
Commits on Oct 13, 2018
-
Minor variable naming and exception message change
* Change local variable names to start with a lower case letter in tests of the NotThrowAfter assertion * Change exception message if NotThrowAfter
Commits on Oct 15, 2018
-
Use portable method for sleeping in NotThrowAfter
The implementation of NotThrowAfter uses Thread.Sleep. This is not supported in older .net standard versions. Hence, Thread.Sleep is replaced by a ManualResetEvent which also allows to wait for a specified time.
Commits on Nov 9, 2018
-
Test "NotThrowAfter_when_subject_is_async_it_should_not_throw" asserts that NotThrowAfter should throw and hence it is renamed accordingly.
Commits on Nov 19, 2018
-
Fix exception message in NotThrowAfter
The messages of the exceptions that are raised if the TimeSpan parameters of NotThrowAfter are negative claim that the parameters should be "positive". Changed to "non-negative". Further change: * Minor formatting change
-
Revert "Use portable method for sleeping in NotThrowAfter"
This reverts commit b46d678. NotThrowAfter has to block the current thread. Since Thread.Sleep() is not available on older versions of netstandard, the previous commit introduced a workaround. It seems prefarable not to use this workaround and disable NotThrowAfter for target frameworks that don't support Thread.Sleep().
-
Disable NotThrowAfter for netstandard < 2.0
Older versions of netstandard don't support Thread.Sleep() which is required by NotThrowAfter.
-
Merge remote-tracking branch 'upstream/master' into NotThrow-Wait
Merge latest changes from upstream
Commits on Nov 22, 2018
-
* Add braces to if * Invert #if condition
-
Commits on Dec 20, 2018
-
Add NotThrowAfter to FunctionAssertions
For consistency with the ActionAssertions. Mirrors the implementation for Actions.
-
Commits on Dec 30, 2018
-
Wrap assertion code of NotThrowAfter in local function
This should make sure that exceptions will reference the correct part of the code.
Commits on Jan 1, 2019
-
Increase wait times in NotThrowAfter tests
This should help to avoid test failure on slow systems
-
Change way NowThrowAfterAsync calls the assertion task
Remove async/await which are not necessary here
Commits on Jan 5, 2019
Commits on Jan 6, 2019
-
Increase wait time in NotThrowAfter-tests
The wait times of two tests were too low. This caused the tests to fail on a slow system.
Commits on Jan 7, 2019
Commits on Jan 8, 2019
-
Merge pull request #1 from jnyrup/NotBeInDescendingOrder
Fixup whitespace
Commits on Jan 9, 2019
-
Change NotThrowAfter for Func<T> to return result
Previously, the return type of NotThrowAfter for Func<T> was void. Now we return the result of the executed func to allow for further assertions on that result.