Ad
  • Default User Avatar

    In random tests there were still times with single digit after ":". Also, I find it a bit non logic that if current time is 22:42 and it takes me 429 minutes to get to the station the answer should be 5:00 and not 6:00 (5:51 rounded to next 30). Makes it look like I suddenly got wings or something.

  • Default User Avatar

    Some random tests have invalid times like these for example: 2:6, 11:3

    My code failed on this test case: 22:42 and 429

    Expected: 'The next train is at 5:00.', instead got: 'The next train is at 6:00.'

    Time after 429 minutes is 5:51 so 6:00 (or 06:00 if hours must be formatted with 2 digits) should be correct, right?

  • Default User Avatar

    In C# tests Assert.AreEqual function parameters seem to be in wrong order (should be expected first and actual second). As a result of this failed test reports expected value as "but was" and wrong value as "expected".

  • Default User Avatar

    Thanks for the kata! :) Maybe add some sample tests?

  • Default User Avatar

    Some sample tests should be added. Currently sample test area has some test template not related to the Kata.

  • Default User Avatar

    C# has tests with Assert.AreEqual called with parameters in wrong order. Correct format is: Assert.AreEqual(expected, actual)

  • Default User Avatar

    C# code won't compile without changing namespace first. I believe that kind of thing shouldn't be necessary unless purpose of Kata is especially bug fixing.

  • Default User Avatar

    Nice kata but the Example Tests section has the right curly brace of the TimeTest class missing.

  • Default User Avatar

    You're welcome and thanks for the kata. I enjoyed it! :)

  • Default User Avatar

    Yes, those errors are gone now. Thanks! There's something in the description that should be changed. It says: "The function should return an empty array if any of the following conditions are met:..." but tests (under TestInvalid) expect null instead of empty string array. Also, for me it's a bit unclear how the price currency is decided. Is it by the paidType?

  • Default User Avatar

    There's something wrong in C# version.

    My code works ok with 'Run Tests' but when I click 'Submit' the following error is thrown:

    /tmp/csharp11682-17-rug8dz/fixture.cs(140,67): error CS0246: The type or namespace name `MonetaryUnit' could not be found. Are you missing an assembly reference?
    Error: Command failed: mcs -out:/tmp/csharp11682-17-rug8dz/test.dll -lib:/runner/frameworks/csharp/nunit -r:nunit.core.dll,nunit.core.interfaces.dll,nunit.util.dll,nunit.framework.dll,Newtonsoft.Json.dll,EntityFramework.dll,Qualified.dll -reference:System.Numerics.dll -reference:System.Drawing.dll -reference:System.Data.dll -reference:System.IO.dll -reference:System.Linq.dll -reference:System.Linq.Dynamic.dll -reference:System.Linq.Expressions.dll -reference:System.Messaging.dll -reference:System.Threading.Tasks.dll -reference:System.Xml.dll -reference:System.Web.dll -reference:Mono.Linq.Expressions.dll -target:library -warn:2 /tmp/csharp11682-17-rug8dz/code.cs /tmp/csharp11682-17-rug8dz/fixture.cs
    /tmp/csharp11682-17-rug8dz/fixture.cs(140,67): error CS0246: The type or namespace name `MonetaryUnit' could not be found. Are you missing an assembly reference?
    

    If I rename the namespace Kata -> MonetaryUnit then following errors appear:

    /tmp/csharp11682-17-ssge3k/fixture.cs(8,54): error CS0246: The type or namespace name `CurrencyType' could not be found. Are you missing `MonetaryUnit' using directive?
    /tmp/csharp11682-17-ssge3k/fixture.cs(8,77): error CS0246: The type or namespace name `CurrencyType' could not be found. Are you missing `MonetaryUnit' using directive?
    Error: Command failed: mcs -out:/tmp/csharp11682-17-ssge3k/test.dll -lib:/runner/frameworks/csharp/nunit -r:nunit.core.dll,nunit.core.interfaces.dll,nunit.util.dll,nunit.framework.dll,Newtonsoft.Json.dll,EntityFramework.dll,Qualified.dll -reference:System.Numerics.dll -reference:System.Drawing.dll -reference:System.Data.dll -reference:System.IO.dll -reference:System.Linq.dll -reference:System.Linq.Dynamic.dll -reference:System.Linq.Expressions.dll -reference:System.Messaging.dll -reference:System.Threading.Tasks.dll -reference:System.Xml.dll -reference:System.Web.dll -reference:Mono.Linq.Expressions.dll -target:library -warn:2 /tmp/csharp11682-17-ssge3k/code.cs /tmp/csharp11682-17-ssge3k/fixture.cs
    /tmp/csharp11682-17-ssge3k/fixture.cs(8,54): error CS0246: The type or namespace name `CurrencyType' could not be found. Are you missing `MonetaryUnit' using directive?
    /tmp/csharp11682-17-ssge3k/fixture.cs(8,77): error CS0246: The type or namespace name `CurrencyType' could not be found. Are you missing `MonetaryUnit' using directive?
    
  • Default User Avatar

    That it was! Finally finished this great kata! :D

  • Default User Avatar

    Ok, I'll give that a try. Thanks Steffen! :)

  • Default User Avatar

    Have you had chance to view my code to see if the problem is by rounding or if there is other error in my code?

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...