Fixed Test file names as per convention

This commit is contained in:
harshavs 2019-08-03 00:11:01 -04:00
parent e30f8c6714
commit e35a8023ea
2 changed files with 9 additions and 8 deletions

View File

@ -17,20 +17,21 @@ import com.baeldung.boot.repository.EmployeeRepository;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
@Sql({ "/employees_schema.sql", "/import_employees.sql" })
public class SpringBootInitialLoadTest {
public class SpringBootInitialLoadIntegrationTest {
@Autowired
private EmployeeRepository employeeRepository;
@Test
public void testLoadDataForTestClass() {
assertEquals(employeeRepository.findAll().size(), 3);
assertEquals(employeeRepository.findAll()
.size(), 3);
}
@Test
@Sql(scripts = {"/import_senior_employees.sql" }
, config = @SqlConfig(encoding = "utf-8", transactionMode = TransactionMode.ISOLATED))
public void testLoadDataForTestCase() {
assertEquals(employeeRepository.findAll().size(), 5);
}
@Sql(scripts = { "/import_senior_employees.sql" }, config = @SqlConfig(encoding = "utf-8", transactionMode = TransactionMode.ISOLATED))
public void testLoadDataForTestCase() {
assertEquals(employeeRepository.findAll()
.size(), 5);
}
}

View File

@ -19,7 +19,7 @@ import com.baeldung.boot.repository.EmployeeRepository;
@SpringBootTest(classes = Application.class)
@SqlGroup({ @Sql(scripts = "/employees_schema.sql", config = @SqlConfig(transactionMode = TransactionMode.ISOLATED)),
@Sql("/import_employees.sql")})
public class SpringBootSqlGroupAnnotationTest {
public class SpringBootSqlGroupAnnotationIntegrationTest {
@Autowired
private EmployeeRepository employeeRepository;