public void CloneTest() { var exp = new Fact(new Number(0)); var clone = exp.Clone(); Assert.Equal(exp, clone); }
public void FactSlots() { Fact fact = new Fact("spending", new Slot("client", new Individual("Peter Miller")), new Individual("min(5000,EUR)")); Assert.AreEqual("Peter Miller", fact.GetPredicateValue("client"), "Slot predicate value"); Fact clone = (Fact)fact.Clone(); fact = null; Assert.AreEqual("Peter Miller", clone.GetPredicateValue("client"), "Slot predicate value after cloning"); }