Arrow Extension - `should beRight` lambda expression support
See original GitHub issueTo test the returned value of an Either
I am using:
val either = passwordColumn.loadType(com.google.gson.JsonPrimitive("73^pickles"))
either.shouldBeRight()
val password = (either as Either.Right<Password?>).b
password.shouldNotBe(null)
password!!.hashedPassword.shouldNotBe(null)
password.useExistingValue.shouldBe(false)
It would be nicer to be able to use lambda expression support, such as:
passwordColumn.loadType(com.google.gson.JsonPrimitive("73^pickles")).shouldBeRight {
it.shouldNotBe(null)
it!!.hashedPassword.shouldNotBe(null)
it.useExistingValue.shouldBe(false)
}
Note: passwordColumn.loadType(...)
returns Either<ValidationError, Password?>
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Lambda Expressions: A Guide
A guide to programming lambda expressions in C++, C#, Java, Javascript, and Python by JoshData. A lambda expression is a convenient syntax available...
Read more >The `=>` operator is used to define a lambda expression in C# ...
The C# => operator defines lambda expressions and expression bodied members. Lambda expressions define a block of code used as data.
Read more >Java 8: Formatting lambda with newlines and indentation
Eclipse (Mars) has an option for lambda expressions formatter. Go to Window > Preferences > Java ... I share it by thinking that...
Read more >JavaScript's Lambda and Arrow Functions - Vinta Blog
Introducing anonymous functions and arrow functions in JavaScript ES6.
Read more >https://inst.eecs.berkeley.edu/~cs61a/reader/mt3-2...
An arrow to a pair points to the entire pair, not just to its car or its cdr. ... In particular, the inner...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We should add the lambda version for now ?
Yep
On Tue, 25 Jun 2019 at 13:54, Leonardo Colman Lopes < notifications@github.com> wrote: