* Tests that it should not fire on trivial rebase when they are excluded.
* @author Doug Kelly <dougk.ff7@gmail.com>
*/
@Test
public void shouldNotFireOnTrivialRebaseWhenExcluded() {
PluginPatchsetCreatedEvent pluginPatchsetCreatedEvent = new PluginPatchsetCreatedEvent(false, true, false);
PatchsetCreated patchsetCreated = new PatchsetCreated();
patchsetCreated.setPatchset(new PatchSet());
//should fire only on regular patchset (no drafts)
assertTrue(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated));
patchsetCreated.getPatchSet().setKind(GerritChangeKind.TRIVIAL_REBASE);
assertFalse(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated));
}