public void If_invalid_subscription_context_specified_exception_is_thrown() { OperationContextProxy.Dummy.LocalAddress = ResourceUri; EventingServer server = new EventingServer(); server.Pull(new PullRequest { EnumerationContext = new EnumerationContextKey("aaa"), }); }
public void If_pull_returns_no_items_exception_is_thrown() { IEventingRequestHandler<int> mockHandler = MockRepository.GenerateMock<IEventingRequestHandler<int>>(); OperationContextProxy.Dummy.LocalAddress = ResourceUri; EventingServer server = new EventingServer(); server.BindWithPullDelivery(ResourceUri, FilterMap.DefaultDialect, typeof(void), mockHandler, ResourceUri); SubscribeResponse subscribeResponse = server.Subscribe(ResourceUri.ToString(), null, new SubscribeRequest { Delivery = Delivery.Pull(), Expires = Expires.FromTimeSpan(TimeSpan.Zero) }); server.Pull(new PullRequest { EnumerationContext = subscribeResponse.EnumerationContext, }); }
public void If_pull_returns_no_items_exception_is_thrown() { IEventingRequestHandler <int> mockHandler = MockRepository.GenerateMock <IEventingRequestHandler <int> >(); OperationContextProxy.Dummy.LocalAddress = ResourceUri; EventingServer server = new EventingServer(); server.BindWithPullDelivery(ResourceUri, FilterMap.DefaultDialect, typeof(void), mockHandler, ResourceUri); SubscribeResponse subscribeResponse = server.Subscribe(ResourceUri.ToString(), null, new SubscribeRequest { Delivery = Delivery.Pull(), Expires = Expires.FromTimeSpan(TimeSpan.Zero) }); server.Pull(new PullRequest { EnumerationContext = subscribeResponse.EnumerationContext, }); }