public void ReturnsTrueIfPersonAgeLesserThanNumberSpeicifed()
        {
            var specification = new PersonUntilAgeSpecification(16);
            var person = new Person() { Age = 15 };

            Assert.True(specification.IsSatisfiedBy(person));
        }
        public void ReturnsTrueIfNoValueIsSpecified()
        {
            var specification = new PersonUntilAgeSpecification(null);
            var person = new Person();

            Assert.True(specification.IsSatisfiedBy(person));
        }
        public void ReturnsFalseIfPersonAgeBiggerThanNumberSpeicifed()
        {
            var specification = new PersonUntilAgeSpecification(14);
            var person = new Person() { Age = 15 };

            Assert.False(specification.IsSatisfiedBy(person));
        }
        public void ReturnsFalsefPersonAgeLesserThanNumberSpeicifed()
        {
            var specification = new PersonFromAgeSpecification(16);
            var person = new Person() { Age = 15 };

            Assert.False(specification.IsSatisfiedBy(person));
        }
        public void ReturnsTrueIfPersonAgeEqualsNumberSpeicifed()
        {
            var specification = new PersonFromAgeSpecification(15);
            var person = new Person() { Age = 15 };

            Assert.True(specification.IsSatisfiedBy(person));
        }
 public void MatchingIsCaseInsensitive()
 {
     var specification = new PersonNameSpecification("JOHN");
     var person = new Person() { Name = "John" };
     Assert.True(specification.IsSatisfiedBy(person));
 }
 public void ReturnsTrueWhenMatchesPartially()
 {
     var specification = new PersonNameSpecification("din");
     var person = new Person() { Name = "Edina" };
     Assert.True(specification.IsSatisfiedBy(person));
 }
 public void ReturnsTrueIfNoNameIsSupplied()
 {
     var specification = new PersonNameSpecification(string.Empty);
     var person = new Person();
     Assert.True(specification.IsSatisfiedBy(person));
 }
 public void MatchingIsCaseInsensitive()
 {
     var specification = new PersonJobTitleSpecification("Manager");
     var person = new Person() { JobTitle = "MaNaGeR" };
     Assert.True(specification.IsSatisfiedBy(person));
 }
 public void ReturnsTrueWhenMatchesPartially()
 {
     var specification = new PersonJobTitleSpecification("CEO");
     var person = new Person() { JobTitle = "The CEO" };
     Assert.True(specification.IsSatisfiedBy(person));
 }