Search in sources :

Example 1 with LogNotifierConfigurationExecutionOptions

use of fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions in project Payara by payara.

the class NotificationExecutionOptionsTest method logNotifierConfigurationExecutionOptionRemovedSuccessfully.

@Test
public void logNotifierConfigurationExecutionOptionRemovedSuccessfully() {
    LogNotifierConfigurationExecutionOptions logExecOptions = new LogNotifierConfigurationExecutionOptions();
    executionOptions.addNotifierConfigurationExecutionOption(logExecOptions);
    executionOptions.removeNotifierConfigurationExecutionOption(logExecOptions);
    assertNotNull(executionOptions.getNotifierConfigurationExecutionOptionsList());
    assertThat(executionOptions.getNotifierConfigurationExecutionOptionsList().size(), is(0));
}
Also used : LogNotifierConfigurationExecutionOptions(fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions) Test(org.junit.Test)

Example 2 with LogNotifierConfigurationExecutionOptions

use of fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions in project Payara by payara.

the class LogNotifierConfigurationExecutionOptionsFactoryMock method notifierConfigurationExecutionOptionBuildsSuccessfullyForLog.

@Test
public void notifierConfigurationExecutionOptionBuildsSuccessfullyForLog() {
    LogNotifierConfiguration logNotifierConfiguration = mock(LogNotifierConfiguration.class);
    when(logNotifierConfiguration.getEnabled()).thenReturn("true");
    LogNotifierConfigurationExecutionOptions executionOptions = factory.build(logNotifierConfiguration);
    assertThat(executionOptions.getNotifierType(), is(NotifierType.LOG));
    assertThat(executionOptions.isEnabled(), is(true));
}
Also used : LogNotifierConfiguration(fish.payara.nucleus.notification.log.LogNotifierConfiguration) LogNotifierConfigurationExecutionOptions(fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions) Test(org.junit.Test)

Example 3 with LogNotifierConfigurationExecutionOptions

use of fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions in project Payara by payara.

the class NotificationExecutionOptionsTest method logNotifierConfigurationExecutionOptionEnabledSuccessfully.

@Test
public void logNotifierConfigurationExecutionOptionEnabledSuccessfully() {
    NotificationExecutionOptions executionOptions = new NotificationExecutionOptions();
    LogNotifierConfigurationExecutionOptions logExecOptions = new LogNotifierConfigurationExecutionOptions();
    logExecOptions.setEnabled(true);
    executionOptions.addNotifierConfigurationExecutionOption(logExecOptions);
    assertNotNull(executionOptions.getNotifierConfigurationExecutionOptionsList());
    assertThat(executionOptions.isNotifierServiceEnabled(LOG), is(true));
}
Also used : LogNotifierConfigurationExecutionOptions(fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions) NotificationExecutionOptions(fish.payara.nucleus.notification.domain.NotificationExecutionOptions) Test(org.junit.Test)

Example 4 with LogNotifierConfigurationExecutionOptions

use of fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions in project Payara by payara.

the class NotificationExecutionOptionsTest method logNotifierConfigurationExecutionOptionAddedSuccessfully.

@Test
public void logNotifierConfigurationExecutionOptionAddedSuccessfully() {
    executionOptions.addNotifierConfigurationExecutionOption(new LogNotifierConfigurationExecutionOptions());
    assertNotNull(executionOptions.getNotifierConfigurationExecutionOptionsList());
    assertThat(executionOptions.getNotifierConfigurationExecutionOptionsList().size(), is(1));
    assertThat(executionOptions.getNotifierConfigurationExecutionOptionsList().get(LOG), is(instanceOf(LogNotifierConfigurationExecutionOptions.class)));
}
Also used : LogNotifierConfigurationExecutionOptions(fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions) Test(org.junit.Test)

Aggregations

LogNotifierConfigurationExecutionOptions (fish.payara.nucleus.notification.log.LogNotifierConfigurationExecutionOptions)4 Test (org.junit.Test)4 NotificationExecutionOptions (fish.payara.nucleus.notification.domain.NotificationExecutionOptions)1 LogNotifierConfiguration (fish.payara.nucleus.notification.log.LogNotifierConfiguration)1