@Test public void testCrash() { result = result.crash(); assertTrue(result.hasCrashed()); }
public CarSimulationResult crash() { return new CarSimulationResult(configuration, distanceTraveled, true, finished); }
CarSimulationResult { public CarSimulationResult crash() { return new CarSimulationResult(configuration, distanceTraveled, true, finished); } }
CarSimulationResult { public CarSimulationResult crash() { return new CarSimulationResult(configuration, distanceTraveled, true, finished); } CarSimulationResult(CarConfiguration configuration, double distanceTraveled,
                               boolean crashed, boolean finished); }
CarSimulationResult { public CarSimulationResult crash() { return new CarSimulationResult(configuration, distanceTraveled, true, finished); } CarSimulationResult(CarConfiguration configuration, double distanceTraveled,
                               boolean crashed, boolean finished); CarConfiguration getConfiguration(); double getDistanceTraveled(); boolean hasCrashed(); boolean hasFinished(); CarSimulationResult crash(); CarSimulationResult finish(); CarSimulationResult finishOn(double distance); CarSimulationResult increaseDistance(double delta); boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
CarSimulationResult { public CarSimulationResult crash() { return new CarSimulationResult(configuration, distanceTraveled, true, finished); } CarSimulationResult(CarConfiguration configuration, double distanceTraveled,
                               boolean crashed, boolean finished); CarConfiguration getConfiguration(); double getDistanceTraveled(); boolean hasCrashed(); boolean hasFinished(); CarSimulationResult crash(); CarSimulationResult finish(); CarSimulationResult finishOn(double distance); CarSimulationResult increaseDistance(double delta); boolean equals(Object other); @Override int hashCode(); @Override String toString();  }