public Unsubscribe ( WorkItemUnsubscribeRequest request ) : WorkItemUnsubscribeResponse | ||
request | WorkItemUnsubscribeRequest | |
return | WorkItemUnsubscribeResponse |
public void TestTestWorkItemService() { ResetCallbackFields(); var service = new TestWorkItemService { Callback = this }; var callback = (IWorkItemActivityCallback)service; var item = new WorkItemData { Type = DicomRetrieveRequest.WorkItemTypeString }; var items = new List <WorkItemData> { item }; var eventType = WorkItemsChangedEventType.Update; callback.WorkItemsChanged(eventType, items); Assert.AreEqual(0, WorkItemChangedCallbackCount); service.Subscribe(new WorkItemSubscribeRequest()); callback.WorkItemsChanged(eventType, items); Assert.AreEqual(1, WorkItemChangedCallbackCount); service.Unsubscribe(new WorkItemUnsubscribeRequest()); callback.WorkItemsChanged(eventType, items); Assert.AreEqual(1, WorkItemChangedCallbackCount); }
public void TestTestWorkItemService() { ResetCallbackFields(); var service = new TestWorkItemService{Callback = this}; var callback = (IWorkItemActivityCallback) service; var item = new WorkItemData { Type = DicomRetrieveRequest.WorkItemTypeString }; var items = new List<WorkItemData> {item}; var eventType = WorkItemsChangedEventType.Update; callback.WorkItemsChanged(eventType, items); Assert.AreEqual(0, WorkItemChangedCallbackCount); service.Subscribe(new WorkItemSubscribeRequest()); callback.WorkItemsChanged(eventType, items); Assert.AreEqual(1, WorkItemChangedCallbackCount); service.Unsubscribe(new WorkItemUnsubscribeRequest()); callback.WorkItemsChanged(eventType, items); Assert.AreEqual(1, WorkItemChangedCallbackCount); }