ryanmarcotte / functional.utilities Goto Github PK
View Code? Open in Web Editor NEWUseful helper libraries built over Functional (https://github.com/JohannesMoersch/Functional)
License: MIT License
Useful helper libraries built over Functional (https://github.com/JohannesMoersch/Functional)
License: MIT License
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(...);
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.
The Functional
suite of libraries provides a Functional.Unions
package that defines discriminated union types. Create a new Functional.Unions.FluentAssertions
NuGet package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.