Closed oraclewalid closed 6 years ago
Great work @oraclewalid
Would it be easy to keep field name ? (would be helpul for json reader/writer)
GenSpec should be in the same package than other tests : io.github.hamsters
It doens't work on deep classes : exemple with this tests
@GenMacro
case class Location(lat : Long, longitude : Long)
@GenMacro
case class DeepPerson(name: String, age :Int, weight :Option[Int] = None, location: Location)
"deep class" should " generate toClass and toHList to" in {
val p = DeepPerson(name = "Christophe Colomb", age = 42, location = Location(42, 54))
HList.toHList(p) shouldEqual "Christophe Colomb"::42::None :: (42 :: 54 :: HNil) ::HNil
}
@dgouyette
Case class <-> HList conversions