Exemple #1
0
        public void AddHandledRequest(HandledRequest handledRequest)
        {
            if (handledRequest == null)
            {
                throw new ArgumentNullException("handledRequest");
            }

            _handledRequests.Add(handledRequest);
        }
        public void AddHandledRequest_WithHandledRequest_AddHandledRequest()
        {
            var handledRequest = new HandledRequest(new ProviderServiceRequest(), new ProviderServiceInteraction());

            var repo = GetSubject();

            repo.AddHandledRequest(handledRequest);

            Assert.Equal(handledRequest, repo.HandledRequests.First());
        }
        public void ClearHandledRequests_WithHandledRequests_HandledRequestIsEmpty()
        {
            var handledRequest1 = new HandledRequest(new ProviderServiceRequest(), new ProviderServiceInteraction());
            var handledRequest2 = new HandledRequest(new ProviderServiceRequest(), new ProviderServiceInteraction());

            var repo = GetSubject();

            repo.AddHandledRequest(handledRequest1);
            repo.AddHandledRequest(handledRequest2);

            repo.ClearHandledRequests();

            Assert.Empty(repo.HandledRequests);
        }
 public void AddHandledRequest(HandledRequest handledRequest)
 {
     _handledRequests.Add(handledRequest);
 }