mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-12 03:24:14 +00:00
Engine failure test style
- Fixes an indentation slip and types the answer lambdas explicitly
This commit is contained in:
+3
-2
@@ -22,6 +22,7 @@ import art.arcane.volmlib.util.stream.ProceduralStream;
|
|||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.mockito.invocation.InvocationOnMock;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@ public class MantleObjectComponentEngineFailureTest {
|
|||||||
when(object.getW()).thenReturn(1);
|
when(object.getW()).thenReturn(1);
|
||||||
when(object.getH()).thenReturn(1);
|
when(object.getH()).thenReturn(1);
|
||||||
when(object.getD()).thenReturn(1);
|
when(object.getD()).thenReturn(1);
|
||||||
doAnswer(invocation -> {
|
doAnswer((InvocationOnMock invocation) -> {
|
||||||
placements.incrementAndGet();
|
placements.incrementAndGet();
|
||||||
throw placementFailure;
|
throw placementFailure;
|
||||||
}).when(object).place(anyInt(), anyInt(), anyInt(), any(IObjectPlacer.class), any(IrisObjectPlacement.class),
|
}).when(object).place(anyInt(), anyInt(), anyInt(), any(IObjectPlacer.class), any(IrisObjectPlacement.class),
|
||||||
@@ -141,7 +142,7 @@ public class MantleObjectComponentEngineFailureTest {
|
|||||||
writer = mock(MantleWriter.class);
|
writer = mock(MantleWriter.class);
|
||||||
when(writer.getMantle()).thenReturn(mantle);
|
when(writer.getMantle()).thenReturn(mantle);
|
||||||
when(writer.getEngine()).thenReturn(engine);
|
when(writer.getEngine()).thenReturn(engine);
|
||||||
doAnswer(invocation -> {
|
doAnswer((InvocationOnMock invocation) -> {
|
||||||
Runnable task = invocation.getArgument(2);
|
Runnable task = invocation.getArgument(2);
|
||||||
task.run();
|
task.run();
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user