You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect that the derived ArgBuilder#build should work in the following ways:
Input: {}, output: Right(Foo(None, None))
Input: null, output Left(ExecutionError("bla"))
However, currently both cases succeed with Foo(None, None). Can be reproduced with the following test that should pass but fails since the first condition is not Left
suite("derived build")(
test("should fail when null is provided for case class with optional fields") {
caseclassFoo(value: Option[String])
valab=ArgBuilder.gen[Foo]
assertTrue(
ab.build(NullValue).isLeft,
ab.build(ObjectValue(Map())).isRight
)
}
)
PS: This is not a problem when validation is enabled as an error will be raised during the validation phase
The text was updated successfully, but these errors were encountered:
Given the following case class:
I expect that the derived
ArgBuilder#build
should work in the following ways:{}
, output:Right(Foo(None, None))
null
, outputLeft(ExecutionError("bla"))
However, currently both cases succeed with
Foo(None, None)
. Can be reproduced with the following test that should pass but fails since the first condition is notLeft
PS: This is not a problem when validation is enabled as an error will be raised during the validation phase
The text was updated successfully, but these errors were encountered: