public void Test_GenerateValue_WhenString_ShouldRetToString()
        {
            IPropDef def = new PropDefFake {
                Compulsory   = true,
                PropertyType = typeof(string)
            };
            ValidValueGeneratorString valueGenerator = new ValidValueGeneratorString(def);
            object value = valueGenerator.GenerateValidValue();

            Assert.IsNotNull(value);
            Assert.IsNotNullOrEmpty(value.ToString());
            Assert.IsInstanceOf(typeof(string), value);
            Assert.AreNotEqual(valueGenerator.GenerateValidValue(), value);
        }
        public void Test_GenerateValue_WhenStringAndMaxLength_ShouldRetToValidValue()
        {
            IPropDef def = new PropDefFake {
                PropertyType = typeof(string)
            };

            def.AddPropRule(CreatePropRuleString(3, 7));
            ValidValueGenerator generator = new ValidValueGeneratorString(def);

            Assert.AreSame(typeof(string), def.PropertyType);
            Assert.IsNotEmpty(def.PropRules.OfType <PropRuleString>().ToList());
            PropRuleString propRule = def.PropRules.OfType <PropRuleString>().First();

            Assert.AreEqual(3, propRule.MinLength);
            Assert.AreEqual(7, propRule.MaxLength);
            object value = generator.GenerateValidValue();

            Assert.IsNotNull(value);
            Assert.GreaterOrEqual(value.ToString().Length, 3);
            Assert.LessOrEqual(value.ToString().Length, 7);
        }