public void Cannot_compare_if_the_value_is_not_a_bool() { var valueComparer = new BoolValueComparer(); valueComparer.CanCompare("x").ShouldBeFalse(); valueComparer.CanCompare(1).ShouldBeFalse(); valueComparer.CanCompare(1.34).ShouldBeFalse(); }
public void Ignores_casing_of_the_expected_value_when_matching() { var comparer = new BoolValueComparer(); comparer.TheseValuesAreTheSame("true", true).ShouldBeTrue(); comparer.TheseValuesAreTheSame("FALSE", false).ShouldBeTrue(); comparer.TheseValuesAreTheSame("truE", true).ShouldBeTrue(); comparer.TheseValuesAreTheSame("false", false).ShouldBeTrue(); }
public void Can_compare_if_the_value_is_a_bool() { var valueComparer = new BoolValueComparer(); valueComparer.CanCompare(true) .ShouldBeTrue(); valueComparer.CanCompare(false) .ShouldBeTrue(); }
public void Returns_false_if_the_value_and_string_do_not_match() { var comparer = new BoolValueComparer(); comparer.TheseValuesAreTheSame("True", false).ShouldBeFalse(); comparer.TheseValuesAreTheSame("False", true).ShouldBeFalse(); }
public void Returns_true_if_the_value_and_string_match() { var comparer = new BoolValueComparer(); comparer.Compare("True", true).Should().BeTrue(); comparer.Compare("False", false).Should().BeTrue(); }