}
public Collection<Service> setOnEachServiceIsTemplateExists(Collection<Service> services){
- if (!featureManager.isActive(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE)){
+ if (!featureManager.isActive(Features.FLAG_2004_INSTANTIATION_TEMPLATES_POPUP)){
return unsetTemplateExistsToAllServices(services);
}
@Test
public void setTemplatesExistance_givenCollection__flagIsActive_thenSameCollectionReturnedWithTemplateExistsProperty(){
- when(featureManager.isActive(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE)).thenReturn(true);
+ when(featureManager.isActive(Features.FLAG_2004_INSTANTIATION_TEMPLATES_POPUP)).thenReturn(true);
when(asyncInstantiationRepository.getAllTemplatesServiceModelIds()).thenReturn(ImmutableSet.of("1", "2"));
Collection<Service> actualCollection = instantiationTemplatesService.setOnEachServiceIsTemplateExists(createGivenCollection());
assertThat(actualCollection, containsInAnyOrder(
@Test
public void setTemplatesExistance_givenCollection_flagIsNotActive_thenTemplatesExistNotAdded(){
- when(featureManager.isActive(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE)).thenReturn(false);
+ when(featureManager.isActive(Features.FLAG_2004_INSTANTIATION_TEMPLATES_POPUP)).thenReturn(false);
Collection<Service> actualCollection = instantiationTemplatesService.setOnEachServiceIsTemplateExists(createGivenCollection());
assertThat("was " + actualCollection, actualCollection, containsInAnyOrder(
allOf(hasProperty("uuid", is("1")), hasProperty("isInstantiationTemplateExists", is(false))),