small testign work

This commit is contained in:
eugenp 2016-10-27 09:42:00 +03:00
parent 30dd0c85e6
commit b2800b7e8e
2 changed files with 5 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import org.junit.Test;
import com.baeldung.interceptor.AuditedInterceptor; import com.baeldung.interceptor.AuditedInterceptor;
import com.baeldung.service.SuperService; import com.baeldung.service.SuperService;
public class TestInterceptor { public class InterceptorIntegrationTest {
Weld weld; Weld weld;
WeldContainer container; WeldContainer container;

View File

@ -23,12 +23,16 @@ public class SpringInterceptorIntegrationTest {
@Autowired @Autowired
private List<String> accumulator; private List<String> accumulator;
//
@Test @Test
public void givenService_whenServiceAndAspectExecuted_thenOk() { public void givenService_whenServiceAndAspectExecuted_thenOk() {
String code = "123456"; String code = "123456";
String result = springSuperService.getInfoFromService(code); String result = springSuperService.getInfoFromService(code);
Assert.assertThat(accumulator.size(), is(2)); Assert.assertThat(accumulator.size(), is(2));
Assert.assertThat(accumulator.get(0), is("Call to getInfoFromService")); Assert.assertThat(accumulator.get(0), is("Call to getInfoFromService"));
Assert.assertThat(accumulator.get(1), is("Method called successfully: getInfoFromService")); Assert.assertThat(accumulator.get(1), is("Method called successfully: getInfoFromService"));
} }
} }