org.eclipse.microprofile.context.tck

## Class MPConfigTest

- java.lang.Object
- - org.jboss.arquillian.testng.Arquillian
  - - org.eclipse.microprofile.context.tck.MPConfigTest

All Implemented Interfaces:
  org.testng.IHookable, org.testng.ITestNGListener

    public class MPConfigTest
    extends org.jboss.arquillian.testng.Arquillian

### Nested Class Summary

### Nested classes/interfaces inherited from class org.jboss.arquillian.testng.Arquillian

`org.jboss.arquillian.testng.Arquillian.UpdateResultListener`

### Field Summary

Fields
`protected MPConfigBean` `bean`
`protected ManagedExecutor` `producedExecutor`
`protected ThreadContext` `producedThreadContext`

### Fields inherited from class org.jboss.arquillian.testng.Arquillian

`ARQUILLIAN_DATA_PROVIDER`

### Constructor Summary

Constructors
Constructor and Description
`MPConfigTest()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `afterMethod(Method m, org.testng.ITestResult result)`
`void` `beanInjected()` Determine if instances injected properly, which is a prerequisite of running these tests.
`void` `beforeMethod(Method m)`
`static org.jboss.shrinkwrap.api.spec.WebArchive` `createDeployment()`
`void` `defaultContextPropagationForManagedExecutorViaMPConfig()` Verify that the cleared and propagated attributes of a ManagedExecutor are defaulted according to the defaults specified by the application in MicroProfile Config.
`void` `defaultContextPropagationForThreadContextViaMPConfig()` Verify that the cleared and propagated attributes of a ThreadContext are defaulted according to the defaults specified by the application in MicroProfile Config.
`void` `defaultMaxAsyncAndMaxQueuedForManagedExecutorViaMPConfig()` Verify that the maxAsync and maxQueued attributes of a ManagedExecutor are defaulted according to the defaults specified by the application in MicroProfile Config.
`void` `explicitlySpecifiedPropagatedTakesPrecedenceOverDefaults()` Verify that MicroProfile config defaults the cleared attribute when only the propagated and maxQueued attributes are specified by the application.
`void` `explicitlySpecifyAllAttributesOfThreadContext()` Verify that MicroProfile config does not default any attributes when all attributes are explicitly specified by the application.
`void` `explicitlySpecifyMaxQueued5()` Verify that MicroProfile config defaults the maxAsync attribute and honors the explicitly specified maxQueued attribute, when only the propagated and maxQueued attributes are specified by the application.

### Methods inherited from class org.jboss.arquillian.testng.Arquillian

`arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### bean

    @Inject
    protected MPConfigBean bean

#### producedExecutor

    @Inject
    protected ManagedExecutor producedExecutor

#### producedThreadContext

    @Inject
     @Named(value="producedThreadContext")
    protected ThreadContext producedThreadContext

### Constructor Detail

#### MPConfigTest

    public MPConfigTest()

### Method Detail

#### afterMethod

    @AfterMethod
    public void afterMethod(Method m,
                                         org.testng.ITestResult result)

#### beforeMethod

    @BeforeMethod
    public void beforeMethod(Method m)

#### createDeployment

    @Deployment
    public static org.jboss.shrinkwrap.api.spec.WebArchive createDeployment()

#### beanInjected

    public void beanInjected()

Determine if instances injected properly, which is a prerequisite of running these tests.

#### defaultContextPropagationForManagedExecutorViaMPConfig

    public void defaultContextPropagationForManagedExecutorViaMPConfig()
                                                                throws ExecutionException,
                                                                       InterruptedException,
                                                                       TimeoutException

Verify that the cleared and propagated attributes of a ManagedExecutor are defaulted according to the defaults specified by the application in MicroProfile Config.

Throws:
  `ExecutionException` - indicates test failure
  `InterruptedException` - indicates test failure
  `TimeoutException` - indicates test failure

#### defaultContextPropagationForThreadContextViaMPConfig

    public void defaultContextPropagationForThreadContextViaMPConfig()

Verify that the cleared and propagated attributes of a ThreadContext are defaulted according to the defaults specified by the application in MicroProfile Config.

#### defaultMaxAsyncAndMaxQueuedForManagedExecutorViaMPConfig

    public void defaultMaxAsyncAndMaxQueuedForManagedExecutorViaMPConfig()
                                                                  throws ExecutionException,
                                                                         InterruptedException,
                                                                         TimeoutException

Verify that the maxAsync and maxQueued attributes of a ManagedExecutor are defaulted according to the defaults specified by the application in MicroProfile Config.

Throws:
  `ExecutionException` - indicates test failure
  `InterruptedException` - indicates test failure
  `TimeoutException` - indicates test failure

#### explicitlySpecifiedPropagatedTakesPrecedenceOverDefaults

    public void explicitlySpecifiedPropagatedTakesPrecedenceOverDefaults()
                                                                  throws ExecutionException,
                                                                         InterruptedException,
                                                                         TimeoutException

Verify that MicroProfile config defaults the cleared attribute when only the propagated and maxQueued attributes are specified by the application.

Throws:
  `ExecutionException` - indicates test failure
  `InterruptedException` - indicates test failure
  `TimeoutException` - indicates test failure

#### explicitlySpecifyAllAttributesOfThreadContext

    public void explicitlySpecifyAllAttributesOfThreadContext()

Verify that MicroProfile config does not default any attributes when all attributes are explicitly specified by the application.

#### explicitlySpecifyMaxQueued5

    public void explicitlySpecifyMaxQueued5()
                                     throws ExecutionException,
                                            InterruptedException,
                                            TimeoutException

Verify that MicroProfile config defaults the maxAsync attribute and honors the explicitly specified maxQueued attribute, when only the propagated and maxQueued attributes are specified by the application.

Throws:
  `ExecutionException` - indicates test failure
  `InterruptedException` - indicates test failure
  `TimeoutException` - indicates test failure