示例#1
0
        public void ModNumbersReturnsSum()
        {
            var rule = new ModRule(4, 5);

            var actual = rule.Apply();

            JsonAssert.AreEquivalent(4, actual);
        }
示例#2
0
        public void ModByZeroThrowsError()
        {
            var rule = new ModRule(4, 0);

            Assert.Throws <JsonLogicException>(() => rule.Apply());
        }
示例#3
0
        public void ModNonNumberThrowsError()
        {
            var rule = new ModRule("test", 5);

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