forked from shouldly/shouldly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BREAKING CHANGES.txt
33 lines (28 loc) · 1.7 KB
/
BREAKING CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
v1.1 -> v2.0 Breaking Changes
# ShouldBeGreaterThan and ShouldBeLessThan are now constrained to IComparable<T>
If you are doing something like this `1.ShouldBeLessThan(3f)` then cast one of the types so they are the same type
i.e `((float)1).ShouldBeLessThan(3f)`
# Method Grouping on Should.Throw no longer works due to async overloads.
Change `Should.Throw(service.DoSomething)` to `Should.Throw(() => service.DoSomething)`
# ShouldBeTypeOf<T> renamed to ShouldBeAssignableTo<T>
v1.0 -> v1.1 Breaking Changes
# Shouldly.Should.Throw<TException> changed to return thrown exception when failed, rather than exception message
FIX: Any code relying on Throw<T>() to return a string should update to call Message. Eg:
Should.Throw<SomeException>(() => throw new OtherException()).Message.ShouldBe("Threw other exception");
# Rhino Mocks has been deprecated from Shouldly
Won't break build as such, but please bear in mind that plans are to remove this functionality from Shouldly
This also means the NuGet package has been updated to remove the explicit dependency on Rhino.Mocks.
# The following classes have been marked internal. They shouldn't have been marked public:
Shouldly.ObjectHelpers
T As<T>()
Shouldly.ShouldlyCoreExtentions
void AssertAwesomely<T>()
Shouldly.TestEnvironment
Shouldly.ShouldlyMessage
Shouldly.ShouldlyMethodsAttribute
Shouldly.StringHelpers
string CommaDelimited<T>()
string DelimitWith<T>()
string Inspect()
If you're using these methods, please implement locally before updating to v1.1
====EOF====