@TestExtension public static class RejectTestProperty extends DeclarativeValidatorContributor { @Override public String validateElement(@Nonnull ModelASTOption option, @CheckForNull FlowExecution execution) { if (option.getName() != null && option.getName().equals("testProperty")) { return "testProperty is rejected"; } else { return null; } } }
List<String> testNameList; try { testNameList = Arrays.asList(a.value()); } catch (AnnotationTypeMismatchException x) { LOGGER.log(Level.WARNING, "ignoring {0} compiled against jenkins-test-harness older than 2.16", e);
throw new AssertionError(); String testName = item.annotation().value(); if (testName.length()>0 && !env.testCase.getName().equals(testName)) continue; // doesn't apply to this test
@TestExtension public static class WhenConditionPickleFactory extends SingleTypedPickleFactory<DeclarativeStageConditional<?>> { @Override @Nonnull protected Pickle pickle(DeclarativeStageConditional<?> d) { return new XStreamPickle(d); } }
throw new AssertionError(); String testName = item.annotation().value(); if (testName.length()>0 && !env.testCase.getName().equals(testName)) continue; // doesn't apply to this test
@TestExtension public static class XStreamPickleFactory extends SingleTypedPickleFactory<Describable<?>> { @Override @Nonnull protected Pickle pickle(@Nonnull Describable<?> d) { return new XStreamPickle(d); } }
String testName = item.annotation().value(); if (testName.length() > 0 && !env.testCase.getName().equals(testName)) { continue; // doesn't apply to this test
@TestExtension("interruptProgramLoad") public static class BadThingPickleFactory extends SingleTypedPickleFactory<BadThing> { @Override protected Pickle pickle(BadThing object) { return new BadThingPickle(); } }
@TestExtension("currentExecutions") public static class DescriptorImpl extends AbstractStepDescriptorImpl { public DescriptorImpl() {super(Execution.class);} @Override public String getFunctionName() {return "retainsBody";} @Override public boolean takesImplicitBlockArgument() {return true;} } public static class Execution extends AbstractStepExecutionImpl {
@TestExtension public static class DescriptorImpl extends AbstractFolderDescriptor { private static final ChildNameGeneratorImpl GENERATOR = new ChildNameGeneratorImpl(); @Override public TopLevelItem newInstance(ItemGroup parent, String name) { return new ComputedFolderImpl(parent, name); } @Override public <I extends TopLevelItem> ChildNameGenerator<AbstractFolder<I>, I> childNameGenerator() { return (ChildNameGenerator<AbstractFolder<I>, I>) GENERATOR; } }
/** * Insert trusted/ dir into the trusted shell to enable trusted code execution */ @TestExtension("trustedShell") public static class TrustedShell extends GroovyShellDecorator { @Override public GroovyShellDecorator forTrusted() { return new UntrustedShellDecorator(); } }
@TestExtension public static class WhenConditionPickleFactory extends WhenStageTest.WhenConditionPickleFactory { } }
@TestExtension public static class DescriptorImpl extends Descriptor<TestDataPublisher> { @Override public String getDisplayName() { return "MockTestDataPublisher"; } } }
@TestExtension public static class DescriptorImpl extends Descriptor<TestDataPublisher> { @Override public String getDisplayName() { return "MockTestDataPublisher"; } } }
@TestExtension("authenticationInSynchronousStep") public static final class DescriptorImpl extends AbstractStepDescriptorImpl { public DescriptorImpl() { super(Execution.class); } @Override public String getFunctionName() { return "auth"; } @Override public String getDisplayName() { return getFunctionName(); } } public static final class Execution extends AbstractSynchronousNonBlockingStepExecution<String> {
@TestExtension("contextClassLoader") public static class DescriptorImpl extends StepDescriptor { @Override public String getFunctionName() { return "classLoad"; } @Override public Set<? extends Class<?>> getRequiredContext() { return Collections.emptySet(); } } }
@TestExtension public static class DescriptorImpl extends AbstractFolderDescriptor { private static final ChildNameGeneratorImpl GENERATOR = new ChildNameGeneratorImpl(); @Override public TopLevelItem newInstance(ItemGroup parent, String name) { return new ComputedFolderImpl(parent, name); } @Override public <I extends TopLevelItem> ChildNameGenerator<AbstractFolder<I>, I> childNameGenerator() { return (ChildNameGenerator<AbstractFolder<I>, I>) GENERATOR; } }
@TestExtension public static class DescriptorImpl extends JobPropertyDescriptor { @Override public boolean isApplicable(Class<? extends Job> jobType) { return FreeStyleProject.class.isAssignableFrom(jobType); } @Override public String getDisplayName() { return null; } } }
@TestExtension public static class DescriptorImpl extends AbstractFolderDescriptor { @Override public TopLevelItem newInstance(ItemGroup parent, String name) { return new SlowComputedFolder(parent, name); } } }
@TestExtension("contextClassLoader") public static final class DescriptorImpl extends StepDescriptor { @Override public Set<? extends Class<?>> getRequiredContext() { return Collections.emptySet(); } @Override public String getFunctionName() { return "checkClassLoader"; } } }