public void Test_CreatePropRule_WhenTypeIsDecimalShouldConstruct() { //---------------Set up test pack------------------- IDefClassFactory defFactory = new DefClassFactory(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var createdPropRule = defFactory.CreatePropRuleDecimal("fdasfd", "fdsafasd"); //---------------Test Result ----------------------- Assert.IsNotNull(createdPropRule); Assert.IsInstanceOf <PropRuleDecimal>(createdPropRule); }
public void Test_CreatePropRuleDecimal() { //---------------Set up test pack------------------- IDefClassFactory defClassFactory = new DefClassFactory(); //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var rule = (PropRuleDecimal)defClassFactory.CreatePropRuleDecimal("SomeName", "SomeMessage"); //---------------Test Result ----------------------- Assert.AreEqual("SomeName", rule.Name); Assert.AreEqual("SomeMessage", rule.Message); Assert.AreEqual(Decimal.MinValue, rule.MinValue); Assert.AreEqual(Decimal.MaxValue, rule.MaxValue); }