public void AddWarningResultOnPropertyThrowsErrorWhenMessageIsEmpty() { var root = new TwoPropertyRules(); var rule = new TwoProps(TwoPropertyRules.Value1Property, TwoPropertyRules.Value2Property); var ctx = new Csla.Rules.RuleContext(null, rule, root, new Dictionary <Core.IPropertyInfo, object> { { TwoPropertyRules.Value1Property, "a" }, { TwoPropertyRules.Value2Property, "b" } }); ctx.AddWarningResult(TwoPropertyRules.Value1Property, string.Empty); Assert.Fail("Must throw exception."); }
public void AddWarningResultThrowsErrorWhenMessageIsEmpty() { var root = new TwoPropertyRules(); var rule = new TwoProps(TwoPropertyRules.Value1Property, TwoPropertyRules.Value2Property); var applicationContext = _testDIContext.CreateTestApplicationContext(); var ctx = new Csla.Rules.RuleContext(applicationContext, null, rule, root, new Dictionary <Core.IPropertyInfo, object> { { TwoPropertyRules.Value1Property, "a" }, { TwoPropertyRules.Value2Property, "b" } }); ctx.AddWarningResult(string.Empty, false); Assert.Fail("Must throw exception."); }