7 kyu
Color of the moment
235 of 339keune
Loading description...
Strings
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Please help, what type of error should i output in case the time is not in the correct format?
You have to throw something :
In C# version:
If tests expect instance of exactly
System.Exception
to be thrown (and that's bad, BTW), it should be mentioned in the description.Using hours, minutes, and seconds to correspond to R, G, and B -- as I assume you intended -- it would be cool to see how this clock's colours change over the course of the day. It would be easy to code, too! I suppose they'd be rather dark colours, given the constraints for valid h/m/s values. But dark colours are good for a clock background. Maybe I'll go try that...
good idea!
Perhaps add a hint, that the time is allowed as 00:00:00 - 23:59:59.
C# translation kumited.
Please add these two test cases
It is validating the
hour
correctly up to23
(maybe it was a random one, maybe it is best to create one for it too), but tests are not checking the range forminutes
andseconds
up to59
.I've added these three tests:
Great Kata :)
thanks :)
Nice kata. Wrapped up some programming fundamentals in a well-explained and interesting puzzle.
thanks, glad you liked it.
Confusing test cases. The real ones expect an exception while the provided ones only works when I return the error message instead of throwing it. Or was that a part of the Kata? Repairing the provided unit tests?
You're right. There was a problem with the second example test case, i fixed it.
Yes, now it works.