Exemplo n.º 1
0
      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"),
         });
      }      
Exemplo n.º 2
0
        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"),
            });
        }
Exemplo n.º 3
0
      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,
            });
      }
Exemplo n.º 4
0
        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,
            });
        }