Ad
  • Custom User Avatar

    Thanks for the tip! I have added a few random tests, please let me know what you think, also I have changed some of the input validation stuff around from another user's critcism that it was a bit confusing.

  • Custom User Avatar

    @Kaiyou

    I change the wording to be more clear, and took away the "Assume" part so it's clear you need to check for the input to be correct. Let me know what you think.

  • Custom User Avatar

    @ben8p:

    I am also very very very very very very very very confused! I'm not sure the last example test case is pointing me to the correct solution, it seems to suggest that you would need to structure the calls the way I expect but not with 8 method calls with blank input, and then 3 method calls with non blank input.

    Edit: your example shows up now, it was hidden before i commented!

  • Custom User Avatar

    Hi smile67, I get your point with this solution that some Random Test Cases would help make this Kata better. I was thinking about how to implement that and the best i could come up with is actually having the correct implementation in the Test Class so that I can run that Random Test inputs through the correct solution and compare it to the user's. Is that the best way you might implement random test cases?

  • Custom User Avatar

    That's fair criticism. I agree that your wording is less confusing and actually the suggestion to make it more like what a Vending Machine would do is even better. I'll consider adding that and updating the kata!

    Thanks for your feedback.

  • Custom User Avatar

    Just took a look at your solution and I haven't tested it, but maybe your inputMoney > 1 should be inputMoney > 1m. I think if you were doing this in visual studio you'd probably get warnings about that.

  • Custom User Avatar

    Hi Kaiyou,

    Thanks for trying out my Kata! So the expected output of "No Change." is maybe just a misleading way of how your code should raise exception to the input. if any of the inputs are in valid it should just return "No Change." and in this example your input money is 1.01 which is greater than the allowed 1.00.

    Please let me know if this answers your question!