Flooded Switzerland

a43dfc10

Jonas B.

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

71 % complete

Suggestions

  • Revise incorrect test MunicipalityReaderTest.testInvalidAreaRowSkipped. The test failed on line 150 when run against a reference implementation:
    NumberFormatException: For input string: "notANumber"
  • Revise incorrect test MunicipalityReaderTest.testInvalidPopulationRowSkipped. The test failed on line 138 when run against a reference implementation:
    NumberFormatException: For input string: "notANumber"
  • Revise incorrect test MunicipalityReaderTest.testParsedMunicipalityEquality. The test failed on line 198 when run against a reference implementation:
    AssertionFailedError: expected: <floodedswitzerland.Municipality@dc97cfe4> but was: <floodedswitzerland.Municipality@57368b8a>
  • Revise incorrect test MunicipalityReaderTest.testRowWithTooFewColumnsSkipped. The test failed on line 114 when run against a reference implementation:
    ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
  • Revise incorrect test MunicipalityReaderTest.testRowWithTooManyColumnsSkipped. The test failed on line 128 when run against a reference implementation:
    AssertionFailedError: expected: <1> but was: <2>
  • Das Verhalten von isFlooded testen, indem ein Mini-ElevationModel erstellt wird, das dem FloodSimulation-Konstruktor übergeben wird. Danach den Wasserstand mit setWaterLevel setzen, isFlooded mit verschiedenen Koordinaten aufrufen und prüfen, dass das richtige Resultat zurückgegeben wird. The test suite already does this partially, but it only detects 27 out of 36 possible bugs in this regard.
  • CoordinateReader.read mit einem CSV-Text aufrufen, welcher eine Gemeinde enthält, die nicht in der Gemeindeliste enthalten ist, und testen, dass eine IOException geworfen wird.
  • CoordinateReader.read mit einem CSV-Text aufrufen, der nicht für jede Gemeinde in der municipalities-Liste einen Eintrag enthält; dann prüfen, dass nur die Gemeinden enthält, für welche Koordinaten vorhanden sind.

Implementation

71 % complete 42 / 42 Tests
  • CoordinateTest.constructorGetter: Passed
  • CoordinateTest.equals: Passed
  • CoordinateTest.equalsNullOrOtherType: Passed
  • CoordinateTest.toStringTest: Passed
  • CoordinateReaderTest.returnsEmptyMap_whenNoMunicipalitiesAndOnlyHeader: Passed
  • CoordinateReaderTest.returnsMapWithAllEntries_whenCsvMatchesMunicipalities: Passed
  • ElevationModelReaderTest.read1x1: Passed
  • ElevationModelReaderTest.read2x2: Passed
  • ElevationModelReaderTest.readHeader: Passed
  • ElevationModelReaderTest.readNoData: Passed
  • ElevationModelReaderTest.readRectangular: Passed
  • ElevationModelTest.constructorGetter: Passed
  • ElevationModelTest.elevationAt1x1: Passed
  • ElevationModelTest.elevationAtBetween: Passed
  • ElevationModelTest.elevationAtExact: Passed
  • ElevationModelTest.elevationAtOutside: Passed
  • FloodSimulationTest.getWaterLevelTest: Passed
  • FloodSimulationTest.increaseWaterLevel: Passed
  • FloodSimulationTest.setAndGetWaterLevel: Passed
  • MunicipalityReaderTest.testAreaPrecision: Passed
  • MunicipalityReaderTest.testCompletelyEmptyInputReturnsEmptyList: Passed
  • MunicipalityReaderTest.testHeaderOnlyReturnsEmptyList: Passed
  • MunicipalityReaderTest.testInvalidAreaRowSkipped: Passed
  • MunicipalityReaderTest.testInvalidPopulationRowSkipped: Passed
  • MunicipalityReaderTest.testMultipleRowsAllParsed: Passed
  • MunicipalityReaderTest.testMunicipalityNameWithSpaces: Passed
  • MunicipalityReaderTest.testOrderPreserved: Passed
  • MunicipalityReaderTest.testParsedMunicipalityEquality: Passed
  • MunicipalityReaderTest.testPopulationWithApostropheStripped: Passed
  • MunicipalityReaderTest.testPopulationWithMultipleApostrophes: Passed
  • MunicipalityReaderTest.testReturnValueNeverNull: Passed
  • MunicipalityReaderTest.testRowWithTooFewColumnsSkipped: Passed
  • MunicipalityReaderTest.testRowWithTooManyColumnsSkipped: Passed
  • MunicipalityReaderTest.testSingleRowParsedCorrectly: Passed
  • MunicipalityReaderTest.testZeroAreaIsValid: Passed
  • MunicipalityReaderTest.testZeroPopulationIsValid: Passed
  • MunicipalityTest.testEquality: Passed
  • MunicipalityTest.testEqualsNullAndOtherTypeCorrect: Passed
  • MunicipalityTest.testGetters: Passed
  • MunicipalityTest.testHashCode: Passed
  • MunicipalityTest.testHashCodeAllAttributes: Passed
  • MunicipalityTest.testNull: Passed

Other Submissions