public void IsSatisfiedBy_CustomErrorCodeConstructors_CustomErrorCodeOnError()
        {
            var entity        = new MustComplyEntity();
            var specification = new MustComplyWithMetadataSpecificationBase <MustComplyEntity>(5, 6, 7);

            Assert.IsFalse(specification.IsSatisfiedBy(entity));
            Assert.IsTrue(specification.SpecificationResult.GetErrors().Any(x => x.ErrorCode == 5));
        }
        public void IsSatisfiedBy_ConstructorEmpty_Success()
        {
            var entity        = new MustComplyEntity();
            var specification = new MustComplyWithMetadataSpecificationBase <MustComplyEntity>();

            Assert.IsFalse(specification.IsSatisfiedBy(entity));
            Assert.AreEqual(specification.SpecificationResult.GetErrors().Count, 1);
        }
        public void IsSatisfiedBy_CustomErrorCodeConstructors_CustomErrorCodeOnError()
        {
            var entity = new MustComplyEntity();
            var specification = new MustComplyWithMetadataSpecificationBase<MustComplyEntity>(5, 6, 7);

            Assert.IsFalse(specification.IsSatisfiedBy(entity));
            Assert.IsTrue(specification.SpecificationResult.GetErrors().Any(x => x.ErrorCode == 5));
        }
        public void IsSatisfiedBy_ConstructorEmpty_Success()
        {
            var entity = new MustComplyEntity();
            var specification = new MustComplyWithMetadataSpecificationBase<MustComplyEntity>();

            Assert.IsFalse(specification.IsSatisfiedBy(entity));
            Assert.AreEqual(specification.SpecificationResult.GetErrors().Count, 1);
        }
        public void IsStisfiedby_ConstrctorEmpty_Succes()
        {
            var entity = new MustComplyEntity();
            var specification = new MustComplyWithMetadataSpecificationBase<MustComplyEntity>();
            entity.Name = "dwqqdw";
            entity.NameMinLength = "kdqop";

            Assert.IsTrue(specification.IsSatisfiedBy(entity));
        }
        public void IsStisfiedby_ConstrctorEmpty_Succes()
        {
            var entity        = new MustComplyEntity();
            var specification = new MustComplyWithMetadataSpecificationBase <MustComplyEntity>();

            entity.Name          = "dwqqdw";
            entity.NameMinLength = "kdqop";

            Assert.IsTrue(specification.IsSatisfiedBy(entity));
        }