Random tests were added.
You are welcome :)
Thank you for solving my Kata.
Hint: look at your first if statement.
if
if (boolean1 || !Pattern.matches("[0-9a-fA-F]+", hexColor) || boolean3)
I run your code and.. yeah, it actually doesn't calculate complementary color for empty string.
Note that if input argument has length less than 6 then you should add a few zeros on begin: "" -> "000000" "FFF" -> "000FFF"
""
"000000"
"FFF"
"000FFF"
Due to the programming practice it's not necessary, but at the moment of writing this Kata I decided to make it little more complicated :)
It seems that you've stucked on this test:
assertEquals("#FFFFFF", HTMLComplementaryColor.getReversedColor(""));
Loading collection data...
Random tests were added.
You are welcome :)
Thank you for solving my Kata.
Hint: look at your first
if
statement.I run your code and.. yeah, it actually doesn't calculate complementary color for empty string.
Note that if input argument has length less than 6 then you should add a few zeros on begin:
""
->"000000"
"FFF"
->"000FFF"
Due to the programming practice it's not necessary, but at the moment of writing this Kata I decided to make it little more complicated :)
It seems that you've stucked on this test:
Note that if input argument has length less than 6 then you should add a few zeros on begin:
"" -> "000000"
"FFF" -> "000FFF"