public void ReturnsFalseWhenRequestDoesNotExist()
        {
            const string providerRequestId = "AnotherProviderId";

            var message = new RequestExistsByProviderIdQuery { ProviderRequestId = providerRequestId };

            var sut = new RequestExistsByProviderIdQueryHandler(Context);
            var result = sut.Handle(message);

            Assert.False(result);
        }
Пример #2
0
        public void ReturnsFalseWhenRequestDoesNotExist()
        {
            const string providerRequestId = "AnotherProviderId";

            var message = new RequestExistsByProviderIdQuery {
                ProviderRequestId = providerRequestId
            };

            var sut    = new RequestExistsByProviderIdQueryHandler(Context);
            var result = sut.Handle(message);

            Assert.False(result);
        }
        public void ReturnsTrueWhenRequestExists()
        {
            const string providerRequestId = "ProviderId";

            var request = new Request { ProviderId = providerRequestId };
            Context.Requests.Add(request);
            Context.SaveChanges();

            var message = new RequestExistsByProviderIdQuery { ProviderRequestId = providerRequestId };

            var sut = new RequestExistsByProviderIdQueryHandler(Context);
            var result = sut.Handle(message);

            Assert.True(result);
        }
Пример #4
0
        public void ReturnsTrueWhenRequestExists()
        {
            const string providerRequestId = "ProviderId";

            var request = new Request {
                ProviderRequestId = providerRequestId
            };

            Context.Requests.Add(request);
            Context.SaveChanges();

            var message = new RequestExistsByProviderIdQuery {
                ProviderRequestId = providerRequestId
            };

            var sut    = new RequestExistsByProviderIdQueryHandler(Context);
            var result = sut.Handle(message);

            Assert.True(result);
        }