public void WhenConvertingEmptyListThenResultIsFalse() { var emptyListToBooleanConverter = new EmptyListToBooleanConverter(); var emptyList = new List <string>(); object result = emptyListToBooleanConverter.Convert(emptyList, typeof(bool), null, new CultureInfo("en-us")); Assert.IsInstanceOfType(result, typeof(bool)); Assert.AreEqual(result, false); }
public void WhenConvertingNotEmptyListThenResultIsTrue() { var emptyListToBooleanConverter = new EmptyListToBooleanConverter(); var list = new List <string>() { "I am not your toy", "you stupid boy" }; object result = emptyListToBooleanConverter.Convert(list, typeof(bool), null, new CultureInfo("en-us")); Assert.IsInstanceOfType(result, typeof(bool)); Assert.AreEqual(result, true); }