From 8b8a6a6e5471c1575fc8467355644113cf290efd Mon Sep 17 00:00:00 2001 From: Korneliusz Wandzel Date: Tue, 30 Jan 2018 18:58:25 +0100 Subject: [PATCH] test names refactoring to given when then --- .../src/test/java/com/baeldung/beaninjectiontypes/BoatTest.java | 2 +- .../src/test/java/com/baeldung/beaninjectiontypes/CarTest.java | 2 +- .../java/com/baeldung/beaninjectiontypes/LawnMowerTest.java | 2 +- .../test/java/com/baeldung/beaninjectiontypes/RocketTest.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/BoatTest.java b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/BoatTest.java index f89a14e942..1ffe6a752f 100644 --- a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/BoatTest.java +++ b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/BoatTest.java @@ -16,7 +16,7 @@ public class BoatTest { Boat boat; @Test - public void engineInjectionTest() { + public void givenAutowired_whenOnSetter_thenInjected() { assertNotNull(boat); assertNotNull(boat.getEngine()); } diff --git a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/CarTest.java b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/CarTest.java index 7c022f891b..7bb9b31dde 100644 --- a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/CarTest.java +++ b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/CarTest.java @@ -16,7 +16,7 @@ public class CarTest { Car car; @Test - public void engineInjectionTest() { + public void givenAutowired_whenOnField_thenSetterInjected() { assertNotNull(car); assertNotNull(car.getEngine()); } diff --git a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/LawnMowerTest.java b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/LawnMowerTest.java index 84595c717d..f59ef05247 100644 --- a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/LawnMowerTest.java +++ b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/LawnMowerTest.java @@ -16,7 +16,7 @@ public class LawnMowerTest { LawnMower lawnMower; @Test - public void engineInjectionTest() { + public void givenAutowired_whenOnField_thenConstructorInjected() { assertNotNull(lawnMower); assertNotNull(lawnMower.getEngine()); } diff --git a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/RocketTest.java b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/RocketTest.java index 3fe44d266e..4723cc450e 100644 --- a/spring-core/src/test/java/com/baeldung/beaninjectiontypes/RocketTest.java +++ b/spring-core/src/test/java/com/baeldung/beaninjectiontypes/RocketTest.java @@ -16,7 +16,7 @@ public class RocketTest { Rocket rocket; @Test - public void engineInjectionTest() { + public void givenAutowired_whenOnConstructor_thenInjected() { assertNotNull(rocket); assertNotNull(rocket.getEngine()); }