public void MoreThanObjectThrowsError() { var rule = new MoreThanRule(JsonDocument.Parse("{}").RootElement, 2); Assert.Throws <JsonLogicException>(() => rule.Apply()); }
public void MoreThanNullThrowsError() { var rule = new MoreThanRule(LiteralRule.Null, 2); Assert.Throws <JsonLogicException>(() => rule.Apply()); }
public void MoreThanArrayThrowsError() { var rule = new MoreThanRule(new JsonElement[] {}.AsJsonElement(), 2); Assert.Throws <JsonLogicException>(() => rule.Apply()); }
public void MoreThanBooleanThrowsError() { var rule = new MoreThanRule(false, 2); JsonAssert.IsFalse(rule.Apply()); }
public void MoreThanStringThrowsError() { var rule = new MoreThanRule("foo", 2); Assert.Throws <JsonLogicException>(() => rule.Apply()); }
public void MoreThanTwoNumbersReturnsFalse() { var rule = new MoreThanRule(1, 2); JsonAssert.IsFalse(rule.Apply()); }
public void MoreThanTwoNumbersReturnsTrue() { var rule = new MoreThanRule(2, 1); JsonAssert.IsTrue(rule.Apply()); }