use of io.jenkins.plugins.casc.impl.configurators.nonnull.nonnullparampackage.PackageParametersNonNullCheckForNull in project configuration-as-code-plugin by jenkinsci.
the class DataBoundConfiguratorTest method packageParametersAreNonnullByDefaultButCanBeNullable.
@Test
@Issue("#1025")
public void packageParametersAreNonnullByDefaultButCanBeNullable() throws Exception {
Mapping config = new Mapping();
ConfiguratorRegistry registry = ConfiguratorRegistry.get();
final PackageParametersNonNullCheckForNull configured = (PackageParametersNonNullCheckForNull) registry.lookupOrFail(PackageParametersNonNullCheckForNull.class).configure(config, new ConfigurationContext(registry));
assertNull(configured.getSecret());
}
Aggregations