Search in sources :

Example 1 with ClassParametersAreNonnullByDefault

use of io.jenkins.plugins.casc.impl.configurators.nonnull.ClassParametersAreNonnullByDefault in project configuration-as-code-plugin by jenkinsci.

the class DataBoundConfiguratorTest method classParametersAreNonnullByDefault.

@Test
public void classParametersAreNonnullByDefault() throws Exception {
    Mapping config = new Mapping();
    ConfiguratorRegistry registry = ConfiguratorRegistry.get();
    final ClassParametersAreNonnullByDefault configured = (ClassParametersAreNonnullByDefault) registry.lookupOrFail(ClassParametersAreNonnullByDefault.class).configure(config, new ConfigurationContext(registry));
    assertTrue(configured.getStrings().isEmpty());
}
Also used : ConfiguratorRegistry(io.jenkins.plugins.casc.ConfiguratorRegistry) ConfigurationContext(io.jenkins.plugins.casc.ConfigurationContext) ClassParametersAreNonnullByDefault(io.jenkins.plugins.casc.impl.configurators.nonnull.ClassParametersAreNonnullByDefault) Mapping(io.jenkins.plugins.casc.model.Mapping) Test(org.junit.Test)

Aggregations

ConfigurationContext (io.jenkins.plugins.casc.ConfigurationContext)1 ConfiguratorRegistry (io.jenkins.plugins.casc.ConfiguratorRegistry)1 ClassParametersAreNonnullByDefault (io.jenkins.plugins.casc.impl.configurators.nonnull.ClassParametersAreNonnullByDefault)1 Mapping (io.jenkins.plugins.casc.model.Mapping)1 Test (org.junit.Test)1