Closes gh-5714
This commit is contained in:
Johnny Lim
2016-04-17 13:36:47 +09:00
committed by Stephane Nicoll
parent 15dee60049
commit 6d48ee9593
23 changed files with 38 additions and 38 deletions

View File

@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import static org.mockito.BDDMockito.given;
/**
* {@code @WebIntegrationTest} for {@link SampleTestApplication}.
* {@code @SpringBootTest} with a random port for {@link SampleTestApplication}.
*
* @author Phillip Webb
*/

View File

@@ -47,14 +47,14 @@ public class UserEntityTests {
private TestEntityManager entityManager;
@Test
public void createWhenUserIdIsNullShouldThrowException() throws Exception {
public void createWhenUsernameIsNullShouldThrowException() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("Username must not be empty");
new User(null, VIN);
}
@Test
public void createWhenUserIdIsEmptyShouldThrowException() throws Exception {
public void createWhenUsernameIsEmptyShouldThrowException() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("Username must not be empty");
new User("", VIN);

View File

@@ -65,7 +65,7 @@ public class VehicleIdentificationNumberTests {
}
@Test
public void equalsAndHashShouldBeBasedOnVin() throws Exception {
public void equalsAndHashCodeShouldBeBasedOnVin() throws Exception {
VehicleIdentificationNumber vin1 = new VehicleIdentificationNumber(SAMPLE_VIN);
VehicleIdentificationNumber vin2 = new VehicleIdentificationNumber(SAMPLE_VIN);
VehicleIdentificationNumber vin3 = new VehicleIdentificationNumber(

View File

@@ -26,7 +26,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
/**
* JSON Tests for {@link VehicleDetails}.
* JSON tests for {@link VehicleDetails}.
*
* @author Phillip Webb
*/

View File

@@ -67,7 +67,7 @@ public class UserVehicleControllerApplicationTests {
@Test
public void welcomeCommandLineRunnerShouldBeAvailable() throws Exception {
// Since we're a @SpringApplicationTest all beans should be available
// Since we're a @SpringBootTest all beans should be available.
assertThat(this.applicationContext.getBean(WelcomeCommandLineRunner.class))
.isNotNull();
}

View File

@@ -102,7 +102,7 @@ public class UserVehicleControllerTests {
@Test(expected = NoSuchBeanDefinitionException.class)
public void welcomeCommandLineRunnerShouldBeAvailable() throws Exception {
// Since we're a @WebMvcTest WelcomeCommandLineRunner should not be available
// Since we're a @WebMvcTest WelcomeCommandLineRunner should not be available.
assertThat(this.applicationContext.getBean(WelcomeCommandLineRunner.class));
}

View File

@@ -69,7 +69,7 @@ public class UserVehicleServiceTests {
}
@Test
public void getVehicleDetailsWhenUserNameNotFoundShouldThrowException()
public void getVehicleDetailsWhenUsernameNotFoundShouldThrowException()
throws Exception {
given(this.userRepository.findByUsername(anyString())).willReturn(null);
this.thrown.expect(UserNameNotFoundException.class);