Datumsangaben und Uhrzeiten formatieren

f0a4e420

Jonas M.

A newer submission is available.
The submission contains compile errors. Tests may have failed because of this.
Some tests are incorrect: They fail when run against a reference implementation. The test suite score has been reduced.

Test Suite

59 % complete

Suggestions

  • Revise incorrect test TextFormatterTest.testFormatCasualDate. The test failed on line 30 when run against a reference implementation:
    AssertionFailedError: expected: <Termin: 1. September '24.> but was: <Termin: 1. September '24>
  • Revise incorrect test TextFormatterTest.testFormatCasualTime. The test failed on line 37 when run against a reference implementation:
    AssertionFailedError: expected: <Start 9 Uhr, Ende 14 Uhr 30.> but was: <Start 9 Uhr Ende 14 Uhr 30>
  • Revise incorrect test TextFormatterTest.testFormatFormalDate. The test failed on line 60 when run against a reference implementation:
    AssertionFailedError: expected: <Termin: 01.09.2024.> but was: <Termin: 01.09.2024>
  • Revise incorrect test TextFormatterTest.testFormatFormalTime. The test failed on line 67 when run against a reference implementation:
    AssertionFailedError: expected: <Start 09:00, Ende 14:30.> but was: <Start 09:00 Ende 14:30>
  • Testen, dass FormalDateTimeFormat ein Datum auch dann korrekt formatiert, wenn das Jahr weniger als vier Ziffern hat.
  • Testen, dass das Resultat von CasualDateTimeFormat.formatDate den korrekten Monatsnamen enthält. The test suite already does this partially, but it only detects 7 out of 13 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

40 % complete 9 / 13 Tests
  • CasualDateTimeFormatTest.testFormatDate2000: Passed
  • CasualDateTimeFormatTest.testFormatDateMonths: Passed
  • CasualDateTimeFormatTest.testFormatDateNot2000: Passed
  • CasualDateTimeFormatTest.testFormatTime: Passed
  • FormalDateTimeFormatTest.testFormatDate2000: Passed
  • FormalDateTimeFormatTest.testFormatTime: Passed
  • TextFormatterTest.testFormatCasual: Passed
  • TextFormatterTest.testFormatCasualDate: Failed
  • TextFormatterTest.testFormatCasualTime: Failed
  • TextFormatterTest.testFormatEmpty: Passed
  • TextFormatterTest.testFormatFormal: Passed
  • TextFormatterTest.testFormatFormalDate: Failed
  • TextFormatterTest.testFormatFormalTime: Failed

Other Submissions