BAEL-4844: Fixing the indentation.
This commit is contained in:
+14
-12
@@ -11,20 +11,22 @@ import static org.mockito.Mockito.verify;
|
||||
|
||||
public class MyTracedServiceConsumerUnitTest {
|
||||
|
||||
@Rule
|
||||
public MockitoRule mockitoRule = MockitoJUnit.rule();
|
||||
@Rule
|
||||
public MockitoRule mockitoRule = MockitoJUnit.rule();
|
||||
|
||||
@Spy
|
||||
private MyTracedService myTracedService;
|
||||
@Spy
|
||||
private MyTracedService myTracedService;
|
||||
|
||||
@Test
|
||||
public void whenCallingConsumer_thenServiceIsCalled() {
|
||||
doNothing().when(myTracedService).performSomeLogic();
|
||||
doNothing().when(myTracedService).performSomeAdditionalLogic();
|
||||
@Test
|
||||
public void whenCallingConsumer_thenServiceIsCalled() {
|
||||
doNothing().when(myTracedService)
|
||||
.performSomeLogic();
|
||||
doNothing().when(myTracedService)
|
||||
.performSomeAdditionalLogic();
|
||||
|
||||
new MyTracedServiceConsumer(myTracedService);
|
||||
new MyTracedServiceConsumer(myTracedService);
|
||||
|
||||
verify(myTracedService).performSomeLogic();
|
||||
verify(myTracedService).performSomeAdditionalLogic();
|
||||
}
|
||||
verify(myTracedService).performSomeLogic();
|
||||
verify(myTracedService).performSomeAdditionalLogic();
|
||||
}
|
||||
}
|
||||
+20
-20
@@ -13,28 +13,28 @@ import static org.junit.Assert.assertTrue;
|
||||
*/
|
||||
public class MyTracedServiceUnitTest {
|
||||
|
||||
@Rule
|
||||
public OutputCaptureRule outputCaptureRule = new OutputCaptureRule();
|
||||
@Rule
|
||||
public OutputCaptureRule outputCaptureRule = new OutputCaptureRule();
|
||||
|
||||
@Test
|
||||
public void whenPerformingSomeLogic_thenTraceAndInfoOutputIsWritten() {
|
||||
MyTracedService myTracedService = new MyTracedService();
|
||||
myTracedService.performSomeLogic();
|
||||
@Test
|
||||
public void whenPerformingSomeLogic_thenTraceAndInfoOutputIsWritten() {
|
||||
MyTracedService myTracedService = new MyTracedService();
|
||||
myTracedService.performSomeLogic();
|
||||
|
||||
String output = outputCaptureRule.getOut();
|
||||
assertTrue(output.contains("TracingAspect - Entering MyTracedService.performSomeLogic"));
|
||||
assertTrue(output.contains("MyTracedService - Inside performSomeLogic"));
|
||||
assertTrue(output.contains("TracingAspect - Exiting MyTracedService.performSomeLogic"));
|
||||
}
|
||||
String output = outputCaptureRule.getOut();
|
||||
assertTrue(output.contains("TracingAspect - Entering MyTracedService.performSomeLogic"));
|
||||
assertTrue(output.contains("MyTracedService - Inside performSomeLogic"));
|
||||
assertTrue(output.contains("TracingAspect - Exiting MyTracedService.performSomeLogic"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenPerformingSomeAdditionalLogic_thenTraceAndInfoOutputIsWritten() {
|
||||
MyTracedService myTracedService = new MyTracedService();
|
||||
myTracedService.performSomeAdditionalLogic();
|
||||
@Test
|
||||
public void whenPerformingSomeAdditionalLogic_thenTraceAndInfoOutputIsWritten() {
|
||||
MyTracedService myTracedService = new MyTracedService();
|
||||
myTracedService.performSomeAdditionalLogic();
|
||||
|
||||
String output = outputCaptureRule.getOut();
|
||||
assertTrue(output.contains("TracingAspect - Entering MyTracedService.performSomeAdditionalLogic"));
|
||||
assertTrue(output.contains("MyTracedService - Inside performSomeAdditionalLogic"));
|
||||
assertTrue(output.contains("TracingAspect - Exiting MyTracedService.performSomeAdditionalLogic"));
|
||||
}
|
||||
String output = outputCaptureRule.getOut();
|
||||
assertTrue(output.contains("TracingAspect - Entering MyTracedService.performSomeAdditionalLogic"));
|
||||
assertTrue(output.contains("MyTracedService - Inside performSomeAdditionalLogic"));
|
||||
assertTrue(output.contains("TracingAspect - Exiting MyTracedService.performSomeAdditionalLogic"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user