@@ -51,10 +51,11 @@ class GraphQLLocalDateTest : FreeSpec({
5151 listOf(
5252 StringValue (""),
5353 StringValue ("not a localdate"),
54- Object ()
5554 ).forEach { literal ->
56- shouldThrow<CoercingParseLiteralException > {
57- GraphqlLocalDateCoercing (false, ISO_LOCAL_DATE ).parseLiteral(literal)
55+ " throws exception for invalid $literal " {
56+ shouldThrow<CoercingParseLiteralException > {
57+ GraphqlLocalDateCoercing (false, ISO_LOCAL_DATE ).parseLiteral(literal)
58+ }
5859 }
5960 }
6061 }
@@ -100,8 +101,10 @@ class GraphQLLocalDateTest : FreeSpec({
100101 "not a date",
101102 Object ()
102103 ).forEach { value ->
103- shouldThrow<CoercingParseValueException > {
104- GraphqlLocalDateCoercing (false, ISO_LOCAL_DATE ).parseValue(value)
104+ " throws exception for invalid $value " {
105+ shouldThrow<CoercingParseValueException > {
106+ GraphqlLocalDateCoercing (false, ISO_LOCAL_DATE ).parseValue(value)
107+ }
105108 }
106109 }
107110 }
@@ -128,15 +131,19 @@ class GraphQLLocalDateTest : FreeSpec({
128131 listOf(
129132 "02/09/1993" to LocalDate .of(1993, 2, 9)
130133 ).forEach { (value, result) ->
131- GraphqlLocalDateCoercing (false, formatter).parseValue(value) shouldBe result
134+ " parse $value into $result (${result::class .java} ) with custom formatter" {
135+ GraphqlLocalDateCoercing (false, formatter).parseValue(value) shouldBe result
136+ }
132137 }
133138 }
134139
135140 " serialize -> success" - {
136141 listOf(
137142 LocalDate .of(2020, 7, 6) to "07/06/2020"
138143 ).forEach { (value, result) ->
139- GraphqlLocalDateCoercing (false, formatter).serialize(value) shouldBe result
144+ " serialize $value into $result (${result::class .java} ) with custom formatting" {
145+ GraphqlLocalDateCoercing (false, formatter).serialize(value) shouldBe result
146+ }
140147 }
141148 }
142149 }
0 commit comments