View Code? Open in Web Editor
NEW
Assertions for Types Defined in Arrow Kt Core LIbrary
License: Apache License 2.0
assertj-arrow-core's Introduction
A passionate backend developer, teacher, and blogger from Italy
๐ฑ Iโm currently learning Functional programming in Scala/Kotlin
๐ I regularly write articles on Rock The Jvm blog , but I've also wrote on Baeldung . Check out all my articles on my blog
๐ Check out my libraries published on Maven Central Repository:
Raise4s , direct-style Scala library to handle logic typed errors. It's a port from Kotlin of the Arrow Kt Raise[E]
context
Kafkaesque ๐, a testing library for applications built on top of Kafka
Kactor ๐ญ, a prototype library implementing the actor model in Kotlin
Arrow/AssertJ Integration ๐งช, a library that adds to AssertJ a bunch on assertion for Either
and Option
type from Arrow Kt
๐ฌ Ask me about Java, Spring, Scala, Cats (still learning), ZIO (still learning), Akka, and Kotlin
๐ Know about my experiences https://www.linkedin.com/in/riccardocardin/
ย
assertj-arrow-core's People
assertj-arrow-core's Issues
Add a README with examples of available assertions.
Add assertions to understand if a Raise<E>() -> A
succeeded of failed.
The new assertions should behave like the following:
RaiseAssert .assertThat({function()}).succeeded()
RaiseAssert .assertThat({function()}}.failed()
Taking as an example the assertj
core library, add a get()
method to the AbstractOptionAssert
class. The method will return an AbstractObjectAssert
if the Option
is not empty.
In this way, all the assertions available on objects will also be public, having an Option<T>
as a starting point.
Taking as an example the assertj
core library, add getRight()
and getLeft()
methods to the AbstractEitherAssert
class. The methods will return an AbstractObjectAssert
if the Either<E, A>
is a Right<A>
or a Left<E>
, respectively.
In this way, all the assertions available on objects will also be public, having an Either<E, A>
as a starting point.
Arrow Kt added the support for the Raise<E>
context since version 1.2.0. Writing tests of functions defined in a Raise<E>
context is challenging.
Please add some support for it.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Open
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Detected dependencies
github-actions
.github/workflows/ci.yml
actions/checkout v4
actions/setup-java v1
.github/workflows/release.yml
actions/checkout v4
actions/setup-java v3
maven
pom.xml
org.assertj:assertj-core 3.25.3
org.jetbrains.kotlin:kotlin-stdlib 1.9.22
io.arrow-kt:arrow-core 1.2.1
org.junit.jupiter:junit-jupiter-api 5.10.2
org.junit.jupiter:junit-jupiter-engine 5.10.2
org.jetbrains.kotlin:kotlin-test 1.9.22
org.apache.maven.plugins:maven-deploy-plugin 3.0.0
org.apache.maven.plugins:maven-compiler-plugin 3.10.1
org.apache.maven.plugins:maven-javadoc-plugin 3.2.0
org.apache.maven.plugins:maven-source-plugin 3.2.1
org.jetbrains.kotlin:kotlin-maven-plugin 1.9.22
org.apache.maven.plugins:maven-surefire-plugin 3.2.5
org.jetbrains.dokka:dokka-maven-plugin 1.9.0
org.apache.maven.plugins:maven-source-plugin 3.2.1
org.jreleaser:jreleaser-maven-plugin 1.5.1
EitherAssert
and OptionAssert
constructors have a public
scope.
We should prevent anyone using them directly instead of the dedicated factory methods.
Unit tests are not running when running the command mvn clean install
๐ตโ๐ซ
Add assertions to verify conditions on Either<E, A>
and Option<A>
wrapped types.
Don't use Arrow deprecated methods.
Hey @rcardin ,
I tried to publish the version on maven, but failed because I don't have the rights to push to this repo.
mvn release:prepare (failed by doing this -> )
'git' 'push' 'ssh://github.com:rcardin/assertj-arrow-core.git' 'refs/heads/main:refs/heads/main'
Add assertions for NonEmptyList<A>
type. As an example, take a look at the assertions list implemented by Kotest library for such type.