public void SimpleEnumToBoolConverter_ConvertBack_GivenMatchingEnumValue_ReturnEnum() { //------------Setup for test-------------------------- var simpleEnumToBoolConvert = new SimpleEnumToBoolConverter(); //------------Execute Test--------------------------- var convert = (LogLevel)simpleEnumToBoolConvert.ConvertBack(true, typeof(bool), LogLevel.DEBUG, CultureInfo.InvariantCulture); //------------Assert Results------------------------- Assert.AreEqual(LogLevel.DEBUG,convert); }
public void SimpleEnumToBoolConverter_ConvertBack_GivenNotMatchingEnumValue_ReturnBindingNothing() { //------------Setup for test-------------------------- var simpleEnumToBoolConvert = new SimpleEnumToBoolConverter(); //------------Execute Test--------------------------- var convert = simpleEnumToBoolConvert.ConvertBack(false, typeof(bool), LogLevel.DEBUG, CultureInfo.InvariantCulture); //------------Assert Results------------------------- Assert.AreEqual(Binding.DoNothing,convert); }
public void SimpleEnumToBoolConverter_Convert_GivenNotMatchingEnumValue_False() { //------------Setup for test-------------------------- var simpleEnumToBoolConvert = new SimpleEnumToBoolConverter(); //------------Execute Test--------------------------- var convert = (bool)simpleEnumToBoolConvert.Convert(LogLevel.FATAL, typeof(bool), LogLevel.DEBUG, CultureInfo.InvariantCulture); //------------Assert Results------------------------- Assert.IsFalse(convert); }