Search in sources :

Example 1 with NonnullParameterConstructor

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

the class DataBoundConfiguratorTest method nonnullConstructorParameter.

@Test
public void nonnullConstructorParameter() throws Exception {
    Mapping config = new Mapping();
    ConfiguratorRegistry registry = ConfiguratorRegistry.get();
    final NonnullParameterConstructor configured = (NonnullParameterConstructor) registry.lookupOrFail(NonnullParameterConstructor.class).configure(config, new ConfigurationContext(registry));
    assertEquals(0, configured.getStrings().size());
}
Also used : ConfiguratorRegistry(io.jenkins.plugins.casc.ConfiguratorRegistry) ConfigurationContext(io.jenkins.plugins.casc.ConfigurationContext) NonnullParameterConstructor(io.jenkins.plugins.casc.impl.configurators.nonnull.NonnullParameterConstructor) 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 NonnullParameterConstructor (io.jenkins.plugins.casc.impl.configurators.nonnull.NonnullParameterConstructor)1 Mapping (io.jenkins.plugins.casc.model.Mapping)1 Test (org.junit.Test)1