public void EmptyStringToBoolConverter_UnitTest_FalseWhenEmptyStringWhiteSpace_ExpectsTrue() { var converter = new EmptyStringToBoolConverter(); converter.IsTrueWhenEmpty = false; var actual = (bool)converter.Convert(" ", typeof(bool), null, null); Assert.IsFalse(actual); }
public void EmptyStringToBoolConverter_UnitTest_TrueWhenEmptyStringEmpty_ExpectsTrue() { var converter = new EmptyStringToBoolConverter(); converter.IsTrueWhenEmpty = true; var actual = (bool)converter.Convert(null, typeof(bool), null, null); Assert.IsTrue(actual); }
public void EmptyStringToBoolConverter_UnitTest_TrueWhenEmptyStringValue_ExpectsFalse() { var converter = new EmptyStringToBoolConverter(); converter.IsTrueWhenEmpty = true; var actual = (bool)converter.Convert("Anything", typeof(bool), null, null); Assert.IsFalse(actual); }