public void HasValueFalse()
        {
            HasValueSpecification not    = new HasValueSpecification("k2");
            SpecificationResult   result = not.Evaluate(new Dictionary <string, object> {
                { "k1", "v1" }
            });

            Assert.False(result.IsSatisfied);
            Assert.Equal("key k2 not found", result.Details);
        }
        public void HasValueFalseNull()
        {
            HasValueSpecification not    = new HasValueSpecification("k2");
            SpecificationResult   result = not.Evaluate(new Dictionary <string, object> {
                { "k2", null }
            });

            Assert.False(result.IsSatisfied);
            Assert.Equal("key k2 has null value", result.Details);
        }
        public void HasValueTrue()
        {
            HasValueSpecification not    = new HasValueSpecification("k1");
            SpecificationResult   result = not.Evaluate(new Dictionary <string, object> {
                { "k1", "v1" }
            });

            Assert.True(result.IsSatisfied);
            Assert.Null(result.Details);
        }
        public void HasValueFalseWithoutDetails()
        {
            HasValueSpecification not    = new HasValueSpecification("k2");
            SpecificationResult   result = not.Evaluate(
                new Dictionary <string, object> {
                { "k1", "v1" }
            },
                new SpecificationEvaluationSettings {
                IncludeDetails = false
            });

            Assert.False(result.IsSatisfied);
            Assert.Null(result.Details);
        }