BAEL-1645 fix

This commit is contained in:
Ekaterina Galkina 2018-04-16 12:36:19 +05:00
parent 07ef351e88
commit 5d5b44c0a9
2 changed files with 18 additions and 0 deletions

View File

@ -43,6 +43,11 @@ public class Car {
Assert.isNull(oil, "oil must be null");
// ...
}
public void replaceBattery(CarBattery carBattery){
Assert.isNull(carBattery.getCharge(), "to replace battery the charge must be null");
// ...
}
public void сhangeEngine(Engine engine) {
Assert.isInstanceOf(ToyotaEngine.class, engine);

View File

@ -0,0 +1,13 @@
package com.baeldung.assertions;
public class CarBattery {
private String charge;
public String getCharge() {
return charge;
}
public void setCharge(String charge) {
this.charge = charge;
}
}