Exemplo n.º 1
0
        public void GivenNoPassword_WhenHavingInvalidInput_ThenResultShouldBeInvalid()
        {
            var request   = AuthenticationRequestFactory.WithPasswordNull();
            var validator = new AuthenticationRequestValidator();

            var result = validator.Validate(request);

            result.IsValid.Should().BeFalse();
        }
Exemplo n.º 2
0
        public void GivenValidate_WhenHavingValidInput_ThenResultShouldBeValid()
        {
            var request   = AuthenticationRequestFactory.Default();
            var validator = new AuthenticationRequestValidator();

            var result = validator.Validate(request);

            result.IsValid.Should().BeTrue();
            result.Errors.Count.Should().Be(0);
        }