use of ddf.catalog.plugin.PolicyResponse in project ddf by codice.
the class PointOfContactPolicyPluginTest method processPostQueryDoesNothing.
@Test
public void processPostQueryDoesNothing() throws java.lang.Exception {
PolicyResponse response = pointOfContactPolicyPlugin.processPostQuery(new ResultImpl(), Collections.emptyMap());
responseIsEmpty(response);
}
use of ddf.catalog.plugin.PolicyResponse in project ddf by codice.
the class PointOfContactPolicyPluginTest method processPreUpdateDoesNothingWithNoPreviousMetacard.
@Test
public void processPreUpdateDoesNothingWithNoPreviousMetacard() throws java.lang.Exception {
when(mockOperationTransaction.getPreviousStateMetacards()).thenReturn(Collections.emptyList());
Map<String, Serializable> inputProperties = new HashMap<String, Serializable>();
inputProperties.put(OPERATION_TRANSACTION_KEY, mockOperationTransaction);
PolicyResponse response = pointOfContactPolicyPlugin.processPreUpdate(new MetacardImpl(), inputProperties);
responseIsEmpty(response);
}
use of ddf.catalog.plugin.PolicyResponse in project ddf by codice.
the class PointOfContactPolicyPluginTest method processPreUpdateDoesNothingWhenPointOfContactsAreSame.
@Test
public void processPreUpdateDoesNothingWhenPointOfContactsAreSame() throws java.lang.Exception {
MetacardImpl metacard = getMetacardWithPointOfContact(TEST_POINT_OF_CONTACT);
PolicyResponse response = pointOfContactPolicyPlugin.processPreUpdate(metacard, setupAndGetInputProperties(metacard));
responseIsEmpty(response);
}
use of ddf.catalog.plugin.PolicyResponse in project ddf by codice.
the class PointOfContactPolicyPluginTest method processPreCreateDoesNothing.
@Test
public void processPreCreateDoesNothing() throws java.lang.Exception {
PolicyResponse response = pointOfContactPolicyPlugin.processPreCreate(new MetacardImpl(), Collections.emptyMap());
responseIsEmpty(response);
}
use of ddf.catalog.plugin.PolicyResponse in project ddf by codice.
the class PointOfContactPolicyPluginTest method processPreUpdateDoesNothingWithWorkspaceMetacard.
@Test
public void processPreUpdateDoesNothingWithWorkspaceMetacard() throws java.lang.Exception {
Set<String> setOfTags = getSetWithGivenTag("workspace");
MetacardImpl oldMetacard = getMetacardWithPointOfContact("edited-" + TEST_POINT_OF_CONTACT);
oldMetacard.setTags(setOfTags);
MetacardImpl newMetacard = getMetacardWithPointOfContact(TEST_POINT_OF_CONTACT);
newMetacard.setTags(setOfTags);
PolicyResponse response = pointOfContactPolicyPlugin.processPreUpdate(newMetacard, setupAndGetInputProperties(oldMetacard));
responseIsEmpty(response);
}
Aggregations