test names refactoring to given when then
This commit is contained in:
parent
7e9794256d
commit
8b8a6a6e54
|
@ -16,7 +16,7 @@ public class BoatTest {
|
||||||
Boat boat;
|
Boat boat;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void engineInjectionTest() {
|
public void givenAutowired_whenOnSetter_thenInjected() {
|
||||||
assertNotNull(boat);
|
assertNotNull(boat);
|
||||||
assertNotNull(boat.getEngine());
|
assertNotNull(boat.getEngine());
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class CarTest {
|
||||||
Car car;
|
Car car;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void engineInjectionTest() {
|
public void givenAutowired_whenOnField_thenSetterInjected() {
|
||||||
assertNotNull(car);
|
assertNotNull(car);
|
||||||
assertNotNull(car.getEngine());
|
assertNotNull(car.getEngine());
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class LawnMowerTest {
|
||||||
LawnMower lawnMower;
|
LawnMower lawnMower;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void engineInjectionTest() {
|
public void givenAutowired_whenOnField_thenConstructorInjected() {
|
||||||
assertNotNull(lawnMower);
|
assertNotNull(lawnMower);
|
||||||
assertNotNull(lawnMower.getEngine());
|
assertNotNull(lawnMower.getEngine());
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class RocketTest {
|
||||||
Rocket rocket;
|
Rocket rocket;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void engineInjectionTest() {
|
public void givenAutowired_whenOnConstructor_thenInjected() {
|
||||||
assertNotNull(rocket);
|
assertNotNull(rocket);
|
||||||
assertNotNull(rocket.getEngine());
|
assertNotNull(rocket.getEngine());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue