本文整理汇总了Java中hudson.tasks.Notifier类的典型用法代码示例。如果您正苦于以下问题:Java Notifier类的具体用法?Java Notifier怎么用?Java Notifier使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Notifier类属于hudson.tasks包,在下文中一共展示了Notifier类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: verifyMatrixAggregatable
import hudson.tasks.Notifier; //导入依赖的package包/类
static <T extends Notifier & MatrixAggregatable> void verifyMatrixAggregatable(Class<T> publisherClass, BuildListener listener) throws InterruptedException, IOException {
AbstractBuild build = mock(AbstractBuild.class);
AbstractProject project = mock(MatrixConfiguration.class);
Notifier publisher = mock(publisherClass);
MatrixBuild parentBuild = mock(MatrixBuild.class);
when(build.getParent()).thenReturn(project);
when(((MatrixAggregatable) publisher).createAggregator(any(MatrixBuild.class), any(Launcher.class), any(BuildListener.class))).thenCallRealMethod();
when(publisher.perform(any(AbstractBuild.class), any(Launcher.class), any(BuildListener.class))).thenReturn(true);
MatrixAggregator aggregator = ((MatrixAggregatable) publisher).createAggregator(parentBuild, null, listener);
aggregator.startBuild();
aggregator.endBuild();
verify(publisher).perform(parentBuild, null, listener);
}