Datumsangaben und Uhrzeiten formatieren

f0871a37

Celine C.

A newer submission is available.
Some tests are incorrect: They fail when run against a reference implementation. The test suite score has been reduced.

Test Suite

41 % complete

Suggestions

  • Revise incorrect test CasualDateTimeFormatTest.casualDateFormattingBefore2000. The test failed on line 21 when run against a reference implementation:
    AssertionFailedError: expected: <2. Februar 0925> but was: <2. Februar 925>
  • Revise incorrect test TextFormatterTest.formatsMultiplePlaceholders. The test failed on line 39 when run against a reference implementation:
    AssertionFailedError: expected: <Start: 04.08.2024, Uhrzeit: 13:45.> but was: <Start: 04.08.2024 Uhrzeit: 13:45>
  • Revise incorrect test TextFormatterTest.formatsSingleDateWithFormalFormatter. The test failed on line 23 when run against a reference implementation:
    AssertionFailedError: expected: <Das Projekt startet am 04.08.2024.> but was: <Das Projekt startet am 04.08.2024>
  • Revise incorrect test TextFormatterTest.formatsTimeWithFormalFormatter. The test failed on line 31 when run against a reference implementation:
    AssertionFailedError: expected: <Die Uhrzeit ist 09:00.> but was: <Die Uhrzeit ist 09:00>
  • Revise incorrect test TextFormatterTest.formatsWithCasualFormatter. The test failed on line 70 when run against a reference implementation:
    AssertionFailedError: expected: <Beginn: 4. August '24, Zeit: 18 Uhr 30.> but was: <Beginn: 4. August '24 Zeit: 18 Uhr 30>
  • Revise incorrect test TextFormatterTest.handlesBrokenClosingBraceGracefully. The test failed on line 78 when run against a reference implementation:
    NoSuchElementException:
  • Revise incorrect test TextFormatterTest.handlesExtraCharactersAfterBrace. The test failed on line 86 when run against a reference implementation:
    AssertionFailedError: expected: <Am 04.08.2024! ist etwas los.> but was: <Am 04.08.2024 ist etwas los.>
  • Revise incorrect test TextFormatterTest.trailingCharactersAfterPlaceholderAreKept. The test failed on line 62 when run against a reference implementation:
    AssertionFailedError: expected: <Termin ist am 04.08.2024!> but was: <Termin ist am 04.08.2024>
  • Testen, dass das Resultat von CasualDateTimeFormat.formatDate den korrekten Monatsnamen enthält. The test suite already does this partially, but it only detects 8 out of 13 possible bugs in this regard.
  • Testen, dass CasualDateTimeFormat auch Daten ausserhalb der Jahre 2000 – 2099 korrekt formatiert. The test suite already does this partially, but it only detects 4 out of 5 possible bugs in this regard.
  • Testen, dass man ein TextFormatter-Objekt erstellen kann, die Methode format vorhanden ist und dass beim Formatieren eines leeren Textes wieder ein leerer Text zurückgegeben wird. The test suite already does this partially, but it only detects 1 out of 2 possible bugs in this regard.

Implementation

41 % complete 19 / 19 Tests
  • CasualDateTimeFormatTest.casualDateFormatting2000s: Passed
  • CasualDateTimeFormatTest.casualDateFormattingBefore2000: Passed
  • CasualDateTimeFormatTest.testDateFormattingAfter2099: Passed
  • CasualDateTimeFormatTest.testTimeFormattingExactHour: Passed
  • CasualDateTimeFormatTest.testTimeFormattingWithMinutes: Passed
  • FormalDateTimeFormatTest.formalDateFormattingShortYear: Passed
  • FormalDateTimeFormatTest.formalDateFormattingSingleDigitDayAndMonth: Passed
  • FormalDateTimeFormatTest.formalDateFormattingStandardYear: Passed
  • FormalDateTimeFormatTest.formalTimeFormattingFullTime: Passed
  • FormalDateTimeFormatTest.formalTimeFormattingZeroMinutes: Passed
  • TextFormatterTest.formatsMultiplePlaceholders: Passed
  • TextFormatterTest.formatsSingleDateWithFormalFormatter: Passed
  • TextFormatterTest.formatsTimeWithFormalFormatter: Passed
  • TextFormatterTest.formatsWithCasualFormatter: Passed
  • TextFormatterTest.handlesBrokenClosingBraceGracefully: Passed
  • TextFormatterTest.handlesExtraCharactersAfterBrace: Passed
  • TextFormatterTest.ignoresUnopenedPlaceholders: Passed
  • TextFormatterTest.returnsTextUnchangedIfNoPlaceholders: Passed
  • TextFormatterTest.trailingCharactersAfterPlaceholderAreKept: Passed

Other Submissions