Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I pressed the button but nothing seems to change.
Is now republished?
We have been checking that issue and it's already solved (The proble was the key length > 18).
I don't know how Codewars works internally but the problem seems to be, the time between we save the edited Kata and the time the server publish those changes, so now it has to work.
Try again, I tried your solution and the random test are not giving key length > 17.
Give us feedback please.
Yes, we have an error generating the keys, but the max key length we have detected was 18 length and in your example your key has 23 length.
Fixed. Try it again and give feedback please.
Fixed.
Fixed.
As you have pointed out and as we have also pointed out in previous responses the method firm is
assertEquals(expected, actual)
. I told you in the previous answer and the screenshot shows it clearly that the Solution class is the class in which our solution is written and the Kata class is the user solution (for example, your solution), also I have seen you have tried to solve the problem and your class isKata
and notSolution
so we don't understand why you say the arguments are wrong for JUnit.We will reduce the test cases, and show more clearly which method is failling.
But for now you should be able to solve it, as we correct the methods in the morning, but in case you want to wait for the test cases with more info we will let you know.
Because at the beginning we thought about not limiting the key, and even the limits were quite random, we adjusted the number of tests based on that and in the future we would like to develop the kata further.
Yes, I saved the changes.
We have the random tests like this, this screenshot was take from another codewars account (to avoid that I may have made a mistake in saving changes).
As you can see, we follow the
assertEquals(expected, actual)
whenSolution
is a class in TestCases where our solution is written and Kata is where you write your solution.Oh, now I see what you mean, you are absolutely right, we have the random tests arguments backwards.
We will correct it.
Thank you very much for the observation.
You are right, we need to check the ranges of our solution as it is producing out of range values.
Our test setup is made in the same way as the sample tests but with different situations (like going over 122). So we use the same
assertEquals
method (not sure if that is what you mean).Thanks for your observation.
We thought it was clear that if you don't have a key to encrypt the phrase you simply return the phrase. We also thought it was fun to try to think what would happen in that situation.
But we will make the description more accurate for people who don't want to interpret it and try the 4 possible cases.
Thanks for your observation.
java translation for revision