@Test public void shouldNotSaveBranchCoverageIfMissingConditions() { DecoratorContext context = mock(DecoratorContext.class); decorator.decorate(resource, context); verify(context, never()).saveMeasure(eq(CoreMetrics.IT_BRANCH_COVERAGE), anyDouble()); }
@Test public void shouldSaveBranchCoverage() { DecoratorContext context = mockContext(20, 15); decorator.decorate(resource, context); verify(context).saveMeasure(CoreMetrics.IT_BRANCH_COVERAGE, 25.0); }