Project project = new Project("foo");
project.setLatestAnalysis(true);
assertThat(decorator.shouldExecuteOnProject(project), is(true));
}
@Test
<BUG>public void shouldDecorateOnlyFiles() throws Exception {
</BUG>
ReviewsMeasuresDecorator decorator = new ReviewsMeasuresDecorator(null);
DecoratorContext context = mock(DecoratorContext.class);
<BUG>Resource<?> resource = new Project("Foo");
decorator.decorate(resource, context);</BUG>
verify(context, never()).saveMeasure(any(Metric.class), anyDouble());

Project project = new Project("foo");
project.setLatestAnalysis(true);
assertThat(decorator.shouldExecuteOnProject(project), is(true));
}
@Test
public void shouldDecorateOnlyPersistableResource() throws Exception {
ReviewsMeasuresDecorator decorator = new ReviewsMeasuresDecorator(null);
DecoratorContext context = mock(DecoratorContext.class);
Resource<?> resource = mock(Resource.class);
when(resource.getScope()).thenReturn(Scopes.BLOCK_UNIT);
decorator.decorate(resource, context);
verify(context, never()).saveMeasure(any(Metric.class), anyDouble());
