Class EventLoopRule

java.lang.Object
org.junit.rules.ExternalResource
com.linecorp.armeria.testing.junit4.common.EventLoopRule
All Implemented Interfaces:
TestRule

public final class EventLoopRule
extends ExternalResource
A TestRule that provides an EventLoopGroup. For example:

 > public class MyTest {
 >     @ClassRule
 >     public static final EventLoopRule eventLoop = new EventLoopRule();
 >
 >     @Test
 >     public void test() {
 >         eventLoop.get().execute(() -> System.out.println("Hello!"));
 >     }
 > }
 
See Also:
EventLoopGroupRule