src/packages/Shouldly.2.4.0/BREAKING CHANGES.txt

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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)`
    # IEnumerable.ShouldBe(IEnumerable) now uses .Equals to compare
        - This is because of c#'s overload selection, it will always pick the ShouldBe<T>(T, T) overload rather than ShouldBe<T>(IEnumerable<T>, IEnumerable<T>)
        - There are two ways to select the IEnumerable overload:
           - Specify T. i.e new[]{"foo"}.ShouldBe<string>(new[]{"foo"});
           - Specify the `ignoreOrder` parameter. i.e new[]{"foo"}.ShouldBe(new[]{"foo"}, ignoreOrder: false)
           - Make expected value less specific than actual, for instance: `new[]{"foo"}.ShouldBe(new[]{"foo"}.AsEnumerable())`
    # 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====

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。