From 33013f1e12dbb94a86b56c742746dd2ddd0716d3 Mon Sep 17 00:00:00 2001 From: Mateusz Kubuszok Date: Wed, 24 Apr 2024 10:15:56 +0200 Subject: [PATCH] Test NonEmptyLazyList, add docs --- .../scalaland/chimney/cats/CatsData213Spec.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 chimney-cats/src/test/scala-2.13+/io/scalaland/chimney/cats/CatsData213Spec.scala diff --git a/chimney-cats/src/test/scala-2.13+/io/scalaland/chimney/cats/CatsData213Spec.scala b/chimney-cats/src/test/scala-2.13+/io/scalaland/chimney/cats/CatsData213Spec.scala new file mode 100644 index 000000000..1d3691489 --- /dev/null +++ b/chimney-cats/src/test/scala-2.13+/io/scalaland/chimney/cats/CatsData213Spec.scala @@ -0,0 +1,15 @@ +package io.scalaland.chimney.cats + +import cats.data.NonEmptyLazyList +import io.scalaland.chimney.ChimneySpec +import io.scalaland.chimney.dsl.* + +class CatsData213Spec extends ChimneySpec{ + + test("DSL should handle transformation to and from cats.data.NonEmptyLazyList") { + List("test").transformIntoPartial[NonEmptyLazyList[String]].asOption ==> Some(NonEmptyLazyList("test")) + List.empty[String].transformIntoPartial[NonEmptyLazyList[String]].asOption ==> None + + NonEmptyLazyList("test").transformInto[List[String]] ==> List("test") + } +}