Coder Social home page Coder Social logo

functional.utilities's People

Contributors

justin-cooney avatar marcotter avatar ryanmarcotte avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

functional.utilities's Issues

Support for Task<Option<T>> and Task<Result<TSuccess, TFailure>>?

It has been proposed to include extension methods for Task<Option<T>> and Task<Result<TSuccess, TFailure>>. I am open to the idea, but would like to discuss approaches first.

I had been wondering about the exclusion of Task<T> assertions in the FluentAssertions library, and - as far as I can tell - they are not included because the maintenance burden would be high: all synchronous methods would have a duplicate asynchronous equivalent. See fluentassertions/fluentassertions#1305 (comment) for more information.

To date, I have been using the following syntax:

(await option).Should().HaveValue().AndValue.Should().Be(...);
(await result).Should().BeSuccessful().AndSuccessValue.Should().Be(...);

I'd like to gather other thoughts before any code is written. The fact that FluentAssertions does not have an extensive set of Task<T>-related assertions means there are compromises to be made here, as the following syntax is not possible:

await Option.Some(1337)
    .Should()
    .HaveValue()
    .AndValue() // fine up to this point
    .Should() // FluentAssertions does not define a BeGreaterThan extension method for Task<int>
    .BeGreaterThan(...);

Upgrade to FluentAssertions 6.0.0

FluentAssertions 6.0.0 has been released! Both Functional.Primitives.FluentAssertions and Functional.Unions.FluentAssertions depend on FluentAssertions 5.x.x. As part of upgrading to FluentAssertions 6.0.0, we will be incrementing the major version number of both Functional.Primitives.FluentAssertions and Functional.Union.FluentAssertions. Now would be the time to make breaking changes if desired.

Add support for Functional.Union

The Functional suite of libraries provides a Functional.Unions package that defines discriminated union types. Create a new Functional.Unions.FluentAssertions NuGet package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.