|
@ -86,6 +86,23 @@ public class AdminTest { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void shouldThrowRuntimeExceptionWhenNull(){ |
|
|
|
|
|
|
|
|
|
|
|
assertThrows(RuntimeException.class, () -> { |
|
|
|
|
|
admin.addFlight(null, airport_fr, airport1_ist, 140); |
|
|
|
|
|
}); |
|
|
|
|
|
assertThrows(RuntimeException.class, () -> { |
|
|
|
|
|
admin.addFlight("1", null, airport1_ist, 140); |
|
|
|
|
|
}); |
|
|
|
|
|
assertThrows(RuntimeException.class, () -> { |
|
|
|
|
|
admin.addFlight("1", airport_fr, null, 140); |
|
|
|
|
|
}); |
|
|
|
|
|
assertThrows(RuntimeException.class, () -> { |
|
|
|
|
|
admin.addFlight("1", airport_fr, airport1_ist, -40); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |