public void DivideNumbersReturnsSum() { var rule = new DivideRule(4, 5); var actual = rule.Apply(); JsonAssert.AreEquivalent(.8, actual); }
public void DivideByZeroThrowsError() { var rule = new DivideRule(4, 0); Assert.Throws <JsonLogicException>(() => rule.Apply()); }
public void DivideNonNumberThrowsError() { var rule = new DivideRule("test", 5); Assert.Throws <JsonLogicException>(() => rule.Apply()); }