public virtual DmnDecisionResultException decisionOutputHasMoreThanOneValue(IDmnDecisionResultEntries result) { return (new DmnDecisionResultException(ExceptionMessage("010", string.Format("Unable to get single decision result entry as it has more than one entry '{0}'", result)))); }
public virtual void testSingleEntry() { startTestProcess("single entry"); IDmnDecisionResultEntries firstOutput = results[0]; Assert.AreEqual("foo", firstOutput.GetFirstEntry()); Assert.AreEqual(Variables.StringValue("foo"), firstOutput.GetFirstEntryTyped <ITypedValue>()); }
public virtual void testEmptyOutput() { startTestProcess("empty output"); Assert.IsFalse(!results.Any(), "The decision result 'ruleResult' should not be empty"); IDmnDecisionResultEntries decisionOutput = results[0]; Assert.IsNull(decisionOutput.GetFirstEntry()); }
public virtual void testCollectSumHitPolicySingleEntryList() { startTestProcess("single entry list"); Assert.AreEqual(1, results.Count); IDmnDecisionResultEntries firstOutput = results[0]; Assert.AreEqual(33, firstOutput.GetFirstEntry()); Assert.AreEqual(Variables.IntegerValue(33), firstOutput.GetFirstEntryTyped <ITypedValue>()); }
public virtual void testCollectCountHitPolicyNoOutput() { startTestProcess("no output"); Assert.AreEqual(1, results.Count); IDmnDecisionResultEntries firstOutput = results[0]; Assert.AreEqual(0, firstOutput.GetFirstEntry()); Assert.AreEqual(Variables.IntegerValue(0), firstOutput.GetFirstEntryTyped <ITypedValue>()); }
public virtual void testMultipleEntries() { startTestProcess("multiple entries"); IDmnDecisionResultEntries firstOutput = results[0]; Assert.AreEqual(Variables.StringValue("foo"), firstOutput["result1"]); Assert.AreEqual(Variables.StringValue("bar"), firstOutput["result2"]); Assert.AreEqual(Variables.StringValue("foo"), firstOutput.GetEntryTyped <ITypedValue>("result1")); Assert.AreEqual(Variables.StringValue("bar"), firstOutput.GetEntryTyped <ITypedValue>("result2")); }
public bool Remove(IDmnDecisionResultEntries item) { return(ruleResults.Remove(item)); }
public bool Contains(IDmnDecisionResultEntries item) { return(ruleResults.Contains(item)); }
public void Add(IDmnDecisionResultEntries item) { ruleResults.Add(item); }
public void Insert(int index, IDmnDecisionResultEntries item) { ruleResults.Insert(index, item); }
public int IndexOf(IDmnDecisionResultEntries item) { return(ruleResults.IndexOf(item)); }