use of org.candlepin.model.ContentOverride in project candlepin by candlepin.
the class ActivationKeyContentOverrideResourceTest method testActivationKeyDeleteOverride.
@Test
public void testActivationKeyDeleteOverride() {
ActivationKeyContentOverride override = new ActivationKeyContentOverride(key, "label", "name", "test");
List<ContentOverride> toDelete = new LinkedList<>();
toDelete.add(override);
akcor.deleteContentOverrides(context, principal, toDelete);
verify(activationKeyContentOverrideCurator, Mockito.times(1)).removeByName(eq(key), eq(override.getContentLabel()), eq(override.getName()));
}
use of org.candlepin.model.ContentOverride in project candlepin by candlepin.
the class ContentOverrideValidatorTest method testValidateValidCollection.
@Test
public void testValidateValidCollection() {
List<ContentOverride> overrides = new LinkedList<>();
overrides.add(new ContentOverride("label", "testname", "value"));
overrides.add(new ContentOverride("other label", "other name", "other value"));
validator.validate(overrides);
}
use of org.candlepin.model.ContentOverride in project candlepin by candlepin.
the class ConsumerContentOverrideResourceTest method testAddOverride.
@Test
public void testAddOverride() {
List<ContentOverride> entries = new LinkedList<>();
ConsumerContentOverride toAdd = new ConsumerContentOverride(consumer, "label", "overridename", "overridevalue");
entries.add(toAdd);
resource.addContentOverrides(context, principal, entries);
Mockito.verify(consumerContentOverrideCurator, Mockito.times(1)).addOrUpdate(consumer, toAdd);
}
Aggregations