diff --git a/README.md b/README.md index 0b3c7fb..e3b0e30 100644 --- a/README.md +++ b/README.md @@ -451,7 +451,7 @@ query {
-scalar URL
+scalar Url
   @specifiedBy(url: 
     "https://www.w3.org/Addressing/URL/url-spec.txt"
   )
diff --git a/src/main/java/graphql/scalars/color/hex/HexColorCodeScalar.java b/src/main/java/graphql/scalars/color/hex/HexColorCodeScalar.java
index 0cdc721..8a44648 100644
--- a/src/main/java/graphql/scalars/color/hex/HexColorCodeScalar.java
+++ b/src/main/java/graphql/scalars/color/hex/HexColorCodeScalar.java
@@ -12,7 +12,8 @@
 /**
  * Access this via {@link graphql.scalars.ExtendedScalars#HexColorCode}
  * See the Web colors for more details.
- * @implNote Supports the following formats: #RGB, #RGBA, #RRGGBB, #RRGGBBAA. Need to be prefixed with '#'
+ * 

+ * Supports the following formats: #RGB, #RGBA, #RRGGBB, #RRGGBBAA. Need to be prefixed with '#' */ public class HexColorCodeScalar { diff --git a/src/test/groovy/graphql/scalars/color/hex/HexColorCodeScalarTest.groovy b/src/test/groovy/graphql/scalars/color/hex/HexColorCodeScalarTest.groovy index 97c6e18..6af9f60 100644 --- a/src/test/groovy/graphql/scalars/color/hex/HexColorCodeScalarTest.groovy +++ b/src/test/groovy/graphql/scalars/color/hex/HexColorCodeScalarTest.groovy @@ -19,11 +19,11 @@ class HexColorCodeScalarTest extends Specification { then: result.equals(expectedValue) where: - input | expectedValue - "#ff0000" | mkColor(0xff, 0, 0) - "#123" | mkColor(0x11, 0x22, 0x33) - "#11223344" | mkColor(0x11, 0x22, 0x33, 0x44) - "#1234" | mkColor(0x11, 0x22, 0x33, 0x44) + input | expectedValue + "#ff0000" | mkColor(0xff, 0, 0) + "#123" | mkColor(0x11, 0x22, 0x33) + "#11223344" | mkColor(0x11, 0x22, 0x33, 0x44) + "#1234" | mkColor(0x11, 0x22, 0x33, 0x44) } @Unroll @@ -47,12 +47,12 @@ class HexColorCodeScalarTest extends Specification { then: result == expectedValue where: - input | expectedValue - "#ff0000" | "#ff0000" - "#123" | "#112233" - "#11223344" | "#11223344" - "#1234" | "#11223344" - mkColor(0x21, 0x23, 0x33) | "#212333" + input | expectedValue + "#ff0000" | "#ff0000" + "#123" | "#112233" + "#11223344" | "#11223344" + "#1234" | "#11223344" + mkColor(0x21, 0x23, 0x33) | "#212333" mkColor(0x21, 0x23, 0x33, 0x44) | "#21233344" } @@ -63,30 +63,30 @@ class HexColorCodeScalarTest extends Specification { then: result.isEqualTo(expectedValue) where: - input | expectedValue - "#ff0000" | new StringValue("#ff0000") - "#123" | new StringValue("#112233") - "#11223344" | new StringValue("#11223344") - "#1234" | new StringValue("#11223344") - mkColor(0x21, 0x23, 0x33) | new StringValue("#212333") + input | expectedValue + "#ff0000" | new StringValue("#ff0000") + "#123" | new StringValue("#112233") + "#11223344" | new StringValue("#11223344") + "#1234" | new StringValue("#11223344") + mkColor(0x21, 0x23, 0x33) | new StringValue("#212333") mkColor(0x21, 0x23, 0x33, 0x44) | new StringValue("#21233344") } @Unroll - def "parseValue throws exception for invalid input #value"() { + def "parseValue throws exception for invalid input #input"() { when: def result = coercing.parseValue(input) then: thrown(CoercingParseValueException) where: - input | _ - "ff000" | _ - "" | _ - "not a hex code" | _ - "42.3" | _ - new Double(42.3) | _ - new Float(42.3) | _ - new Object() | _ + input | _ + "ff000" | _ + "" | _ + "not a hex code" | _ + "42.3" | _ + Double.valueOf(42.3) | _ + Float.valueOf(42.3) | _ + new Object() | _ } } \ No newline at end of file