Flooded Switzerland

47475ba1

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

63 % 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.
  • Testen, dass CoordinateReader eine leere Map zurückgibt, wenn eine leere Gemeindeliste und ein CSV-Text übergeben wird, der nur den Header enthält.
  • CoordinateReader.read mit einem CSV-Text mit mehreren Zeilen und einer passenden Gemeindeliste aufrufen und testen, dass eine Map mit entsprechend vielen Einträgen zurückgegeben wird.

Implementation

63 % complete 40 / 40 Tests
  • CoordinateTest.constructorGetter: Passed
  • CoordinateTest.equals: Passed
  • CoordinateTest.equalsNullOrOtherType: Passed
  • CoordinateTest.toStringTest: 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