@Test
public void testAfterSessionStart_nullRevision()
throws MavenExecutionException,
RevisionGeneratorException {
String revision = null;
exceptions.expect(MavenExecutionException.class);
exceptions.expectMessage("RevisionGenerator returned a null revision value");
exceptions.expectCause(IsInstanceOf.any(RevisionGeneratorException.class));
when(revisionGenerator.getRevision()).thenReturn(revision);
try {
item.afterSessionStart(session);
} finally {
verify(revisionGenerator).init(eq(session), any(Logger.class));
verify(revisionGenerator).getRevision();
verifyNoMoreInteractions(revisionGenerator);
verifyZeroInteractions(session);
verifyZeroInteractions(pluginMerger);
verifyZeroInteractions(plugins);
}
}
CDVersionLifecycleParticipantTest.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:cdversion-maven-extension
作者:
评论列表
文章目录