public void Should_have_error_for_each_bad_data() { Assert.IsTrue(RuleErrors.SingleOrDefault(x => x.Id == 2) != null); Assert.IsTrue(RuleErrors.SingleOrDefault(x => x.Id == 3) != null); Assert.IsTrue(RuleErrors.SingleOrDefault(x => x.Id == 4) != null); Assert.IsTrue(RuleErrors.SingleOrDefault(x => x.Id == 5) != null); }
public void Should_sum_across_group() { Assert.IsTrue(RuleErrors.Any(x => x.Id == 2 && x.RuleId == "100.4")); }
public void Should_count_across_all() { Assert.IsTrue(RuleErrors.Any(x => x.Id == 2 && x.RuleId == "100.1")); }
public void Should_error_on_second_element() { Assert.IsTrue(RuleErrors.All(x => x.Id == 2)); }
public void Should_subtract_days_between_dates() { Assert.AreEqual(1, RuleErrors.Count); Assert.IsTrue(RuleErrors.Any(x => x.Id == 3)); }
public void Should_error_on_string_not_in_lookup() { Assert.AreEqual(1, RuleErrors.Count(x => x.Id == 4)); Assert.IsFalse(RuleErrors.SingleOrDefault(x => x.RuleId == "100.0") == null); }
public void Should_compute_min() { Assert.IsTrue(RuleErrors.Count(x => x.RuleId == "100.2") == 1); }
public void Should_fail_for_second_data_element() { Assert.IsTrue(RuleErrors.Any(x => x.Id == 2 && x.RuleId == "100.1")); }
public void Should_contain_errors_not_warnings() { Assert.IsTrue(RuleErrors.All(x => x.IsError)); }
public void Should_pass_first_data_point() { Assert.IsFalse(RuleErrors.Any(x => x.Id == 1)); }
public void Should_error_on_nonexisting_value() { Assert.AreEqual(1, RuleErrors.Count(x => x.Id == 2)); Assert.AreEqual(1, RuleErrors.Count(x => x.RuleId == "100.0")); }
public void Should_not_error_on_existing_value() { Assert.IsFalse(RuleErrors.Any(x => x.Id == 1)); }
public void Should_error_on_string_not_in_lookup() { Assert.AreEqual(1, RuleErrors.Count(x => x.Id == 4)); Assert.AreEqual(1, RuleErrors.Count(x => x.Id == 5)); Assert.AreEqual(2, RuleErrors.Count(x => x.RuleId == "100.0")); }
public void Should_not_error_on_string_in_lookup() { Assert.IsFalse(RuleErrors.Any(x => x.Id == 1)); Assert.IsFalse(RuleErrors.Any(x => x.Id == 2)); Assert.IsFalse(RuleErrors.Any(x => x.Id == 3)); }
public void Should_count_with_when() { Assert.IsTrue(RuleErrors.Any(x => x.Id == 2 && x.RuleId == "100.2")); }
public void Should_count_without_when() { Assert.IsFalse(RuleErrors.Any(x => x.RuleId == "100.1")); }
public void Errors_should_contain_contain_rule_info() { Assert.IsTrue(RuleErrors.All(x => x.RuleId == "100.0")); Assert.IsTrue(RuleErrors.All(x => x.Message == "Failed ValueComparisonTest")); }
public void Should_compute_max() { Assert.IsTrue(RuleErrors.Count(x => x.RuleId == "100.1") == 0); }
public void Should_compute_latest_dates() { Assert.AreEqual(1, RuleErrors.Count(x => x.RuleId == "100.2")); Assert.IsTrue(RuleErrors.Any(x => x.Id == 2)); }
public void Should_show_correct_error_for_min_rule() { Assert.IsTrue(RuleErrors.Any(x => x.Id == 2 && x.RuleId == "100.3")); Assert.IsTrue(RuleErrors.Any(x => x.Id == 3 && x.RuleId == "100.3")); Assert.IsTrue(RuleErrors.Any(x => x.Id == 4 && x.RuleId == "100.3")); }
public void Should_not_match_second_component() { Assert.AreEqual(2, RuleErrors.Count); Assert.IsTrue(RuleErrors.Any(x => x.Id == 2 && x.RuleId == "100.1")); Assert.IsTrue(RuleErrors.Any(x => x.Id == 2 && x.RuleId == "100.2")); }