@Test public void cancelAllTest() { NamespaceChangesStatus namespacesChangesStatusReturned = namespacesChangesService.cancelAll(SERVICE_NAME); Assert.assertEquals(0, namespacesChangesStatusReturned.getNamespaceChanges().size()); verify(namespacedListsService, never()).addNamespacedList(namespacedList1); verify(namespacedListsService, never()).addNamespacedList(namespacedList2); verify(namespacedListsService, never()).deleteNamespacedList(namespacedList3.getName()); }
public NamespaceChangesStatus cancelAll(String serviceName) { NamespaceChangesStatus namespaceChangesStatus = getNamespaceChangesStatus(serviceName); namespaceChangesStatus.clear(); save(serviceName, namespaceChangesStatus); return namespaceChangesStatus; }
NamespacesChangesService { public NamespaceChangesStatus cancelAll(String serviceName) { NamespaceChangesStatus namespaceChangesStatus = getNamespaceChangesStatus(serviceName); namespaceChangesStatus.clear(); save(serviceName, namespaceChangesStatus); return namespaceChangesStatus; } }
NamespacesChangesService { public NamespaceChangesStatus cancelAll(String serviceName) { NamespaceChangesStatus namespaceChangesStatus = getNamespaceChangesStatus(serviceName); namespaceChangesStatus.clear(); save(serviceName, namespaceChangesStatus); return namespaceChangesStatus; }  }
NamespacesChangesService { public NamespaceChangesStatus cancelAll(String serviceName) { NamespaceChangesStatus namespaceChangesStatus = getNamespaceChangesStatus(serviceName); namespaceChangesStatus.clear(); save(serviceName, namespaceChangesStatus); return namespaceChangesStatus; }  void save(String serviceName, NamespaceChangesStatus namespaceChangesStatus); NamespaceChangesStatus getNamespaceChangesStatus(String serviceName); NamespaceChangesStatus approve(String serviceName, NamespacedList namespacedList); NamespaceChangesStatus cancelAll(String serviceName); NamespaceChangesStatus cancel(String serviceName, NamespacedList namespacedList); NamespaceChangesStatus approveAll(String serviceName); }
NamespacesChangesService { public NamespaceChangesStatus cancelAll(String serviceName) { NamespaceChangesStatus namespaceChangesStatus = getNamespaceChangesStatus(serviceName); namespaceChangesStatus.clear(); save(serviceName, namespaceChangesStatus); return namespaceChangesStatus; }  void save(String serviceName, NamespaceChangesStatus namespaceChangesStatus); NamespaceChangesStatus getNamespaceChangesStatus(String serviceName); NamespaceChangesStatus approve(String serviceName, NamespacedList namespacedList); NamespaceChangesStatus cancelAll(String serviceName); NamespaceChangesStatus cancel(String serviceName, NamespacedList namespacedList); NamespaceChangesStatus approveAll(String serviceName);  }