public void WhenConvertCalledWithNullValueThenFalseReturned() { // Arrange var expected = false; var value = (object)null; var converterParameter = DummyEnum.Value1; var target = new EnumBooleanConverter(); // Act var actual = target.Convert(value, typeof(bool), converterParameter, CultureInfo.InvariantCulture); // Assert Assert.AreEqual(expected, actual); }
public void WhenConvertCalledWithMatchingValueThenTrueReturned() { // Arrange var expected = true; var value = DummyEnum.Value2; var converterParameter = DummyEnum.Value2; var target = new EnumBooleanConverter(); // Act var actual = target.Convert(value, typeof(bool), converterParameter, CultureInfo.InvariantCulture); // Assert Assert.AreEqual(expected, actual); }