Search in sources :

Example 6 with Trigger

use of hudson.triggers.Trigger in project hudson-2.x by hudson.

the class TriggerProjectPropertyTest method testOnCascadingProjectRemoved.

/**
     * Verify {@link TriggerProjectProperty#onCascadingProjectRemoved()} method.
     *
     * @throws antlr.ANTLRException if any
     */
@Test
public void testOnCascadingProjectRemoved() throws ANTLRException {
    Trigger trigger = new TimerTrigger("* * * * *");
    property.setOriginalValue(trigger, false);
    assertTrue(trigger == property.getOriginalValue());
    assertFalse(property.isOverridden());
    property.onCascadingProjectRemoved();
    assertFalse(property.isOverridden());
    assertTrue(trigger == property.getOriginalValue());
}
Also used : Trigger(hudson.triggers.Trigger) TimerTrigger(hudson.triggers.TimerTrigger) TimerTrigger(hudson.triggers.TimerTrigger) Test(org.junit.Test)

Aggregations

Trigger (hudson.triggers.Trigger)6 TimerTrigger (hudson.triggers.TimerTrigger)4 Test (org.junit.Test)4 SCMTrigger (hudson.triggers.SCMTrigger)2 Job (hudson.model.Job)1 NullSCM (hudson.scm.NullSCM)1 BuildTrigger (hudson.tasks.BuildTrigger)1 TriggerDescriptor (hudson.triggers.TriggerDescriptor)1 File (java.io.File)1 IOException (java.io.IOException)1 Vector (java.util.Vector)1 SC_INTERNAL_SERVER_ERROR (javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR)1 ICascadingJob (org.hudsonci.api.model.ICascadingJob)1 TriggerProjectProperty (org.hudsonci.model.project.property.TriggerProjectProperty)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1