예제 #1
0
        public void DivideNumbersReturnsSum()
        {
            var rule = new DivideRule(4, 5);

            var actual = rule.Apply();

            JsonAssert.AreEquivalent(.8, actual);
        }
예제 #2
0
        public void DivideByZeroThrowsError()
        {
            var rule = new DivideRule(4, 0);

            Assert.Throws <JsonLogicException>(() => rule.Apply());
        }
예제 #3
0
        public void DivideNonNumberThrowsError()
        {
            var rule = new DivideRule("test", 5);

            Assert.Throws <JsonLogicException>(() => rule.Apply());
        }