Skip to content
Permalink
Browse files

Add Codec.forProductN tests

  • Loading branch information...
travisbrown committed Jun 12, 2019
1 parent cf24ba1 commit fb5f671a32abc1e1bd2340893f2c9612f20d4980
Showing with 14 additions and 0 deletions.
  1. +14 −0 project/Boilerplate.scala
@@ -380,8 +380,22 @@ object Boilerplate {
- Encoder.forProduct$arity($memberNames)((Cc$arity.unapply _).andThen(_.get))
- implicit val decodeCc$arity: Decoder[Cc$arity] =
- Decoder.forProduct$arity($memberNames)(Cc$arity.apply)
- val codecForCc$arity: Codec[Cc$arity] =
- Codec.forProduct$arity($memberNames)(Cc$arity.apply)((Cc$arity.unapply _).andThen(_.get))
- }
- checkLaws("Codec[Cc$arity]", CodecTests[Cc$arity].unserializableCodec)
- checkLaws(
- "Codec[Cc$arity] via Codec",
- CodecTests[Cc$arity](Cc$arity.codecForCc$arity, Cc$arity.codecForCc$arity).unserializableCodec
- )
- checkLaws(
- "Codec[Cc$arity] via Decoder and Codec",
- CodecTests[Cc$arity](Cc$arity.decodeCc$arity, Cc$arity.codecForCc$arity).unserializableCodec
- )
- checkLaws(
- "Codec[Cc$arity] via Encoder and Codec",
- CodecTests[Cc$arity](Cc$arity.codecForCc$arity, Cc$arity.encodeCc$arity).unserializableCodec
- )
|}
"""
}

0 comments on commit fb5f671

Please sign in to comment.
You can’t perform that action at this time.