未验证 提交 c752515d 编写于 作者: 梦境迷离's avatar 梦境迷离 提交者: GitHub

Update TransformableTest.scala

上级 87990ce7
......@@ -35,7 +35,7 @@ class TransformableTest extends AnyFlatSpec with Matchers {
case class A2(a: String, b: Int, c: Int, d: Option[String])
val a = A1("hello", 1, 2, None)
val b: A2 = Transformable[A1, A2] // todo `fromField: Long` type Long cannot be ignored.
val b: A2 = Transformable[A1, A2]
.setName(_.cc, _.c)
.setType[Long, Int](_.cc, fromField => if (fromField > 0) fromField.toInt else 0)
.instance
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册