Example #1
0
        public void ReturnFalseWhenBearAnimalHaveFamilyIdNotEqualTo3()
        {
            var specification = new AnimalsSpecification <BearRestrained>();
            var animal        = new Animal
            {
                FamilyId = 4
            };
            var satisfy = specification.Satisfy(animal);

            satisfy.Should().BeFalse();
        }
Example #2
0
        public void ReturnTrueWhenBearAnimalHaveFamilyIdEqualTo3()
        {
            var specification = new AnimalsSpecification <BearDetails>();
            var animal        = new Animal
            {
                FamilyId = 3
            };
            var satisfy = specification.Satisfy(animal);

            satisfy.Should().BeTrue();
        }
Example #3
0
        public void HaveAccidentOriginsRelationship()
        {
            var specification = new AnimalsSpecification <BearCreating>();

            specification.Relationships[0].Root.ToString().Should().Be("animal => animal.Family");
        }