public void WhenBothIdAndEmailAddressNotSpecifiedThenItWillBeInvalid()
        {
            var sut = new GetEmailAccountDetail.Validator();

            var result = sut.Validate(new GetEmailAccountDetail.Query());

            Assert.That(result.IsValid, Is.False);
            Assert.That(result.Errors[0].ErrorMessage, Is.EqualTo("Either ID or Email Address must be specified."));
        }
        public void WhenEmailAddressSpecifiedButNotIdThenItWillBeValid()
        {
            var sut = new GetEmailAccountDetail.Validator();

            var result = sut.Validate(new GetEmailAccountDetail.Query {
                EmailAddress = "*****@*****.**"
            });

            Assert.That(result.IsValid, Is.True);
        }
        public void WhenIdSpecifiedButNotEmailAddressThenItWillBeValid()
        {
            var sut = new GetEmailAccountDetail.Validator();

            var result = sut.Validate(new GetEmailAccountDetail.Query {
                Id = 1
            });

            Assert.That(result.IsValid, Is.True);
        }