public void T4() { // Arrange var testConverter = new OptionalDoubleToStringConverter(); // Act var actual = testConverter.ConvertBack(null, typeof(object), null !, InvariantCulture); // Assert Assert.IsType <Option.OptionNone <double> >(actual); }
public void T3() { // Arrange var testConverter = new OptionalDoubleToStringConverter(); // Act var actual = testConverter.ConvertBack(null, null, null !, InvariantCulture); // Assert Assert.Equal(null !, actual); }
public void T5() { // Arrange var testConverter = new OptionalDoubleToStringConverter(); const double testValue = 5.34; // Act var actual = testConverter.ConvertBack(testValue.ToString(), typeof(object), null !, InvariantCulture); // Assert var d = (Optional <double>)actual; d.IfExistsThen(x => { Assert.Equal(testValue, x); }); }