PAN-11 Fixed integration tests

This commit is contained in:
2019-04-07 16:51:36 -06:00
parent 609f018f9f
commit c75b243df8
4 changed files with 8 additions and 19 deletions
@@ -18,7 +18,7 @@ import static org.junit.Assert.*;
import static org.mockito.AdditionalMatchers.not;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = ServiceTestConfig.class)
@ContextConfiguration(classes = ServicesTestConfig.class)
@TestPropertySource(locations = "classpath:test.properties")
public class DefinitionServiceIntegrationTest {
@Autowired private DefinitionService definitionService;
@@ -1,17 +0,0 @@
package edu.msudenver.tsp.services;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan
public class ServiceTestConfig {
@Bean
@Autowired
public DefinitionService definitionService(final RestService restService) {
return new DefinitionService(restService);
}
}
@@ -14,4 +14,10 @@ public class ServicesTestConfig {
public UserService userService(final RestService restService) {
return new UserService(restService);
}
@Bean
@Autowired
public DefinitionService definitionService(final RestService restService) {
return new DefinitionService(restService);
}
}
@@ -23,7 +23,7 @@ public class UserServiceIntegrationTest {
private UserService userService;
@Test
public void testUserService(){
public void testCRUD() {
final Account testAccount = createAccount();
final Optional<Account> testCreatedAccount = userService.createAccount(testAccount);