Exemplo n.º 1
0
        public void Bad_request_should_throw(HubUserNotify.Request request)
        {
            var         subject = new HubUserNotify.Validator();
            Func <Task> action  = async() => await subject.Process(request, default);

            action.Should().Throw <ValidationException>();
        }
Exemplo n.º 2
0
        public void Good_request_should_not_throw()
        {
            var request = new HubUserNotify.Request()
            {
                UserId  = Guid.NewGuid(),
                Message = "Hello World"
            };
            var         subject = new HubUserNotify.Validator();
            Func <Task> action  = async() => await subject.Process(request, default);

            action.Should().NotThrow <ValidationException>();
        }