public void ShouldReturnNullStringForNullValue() { object converted = new NullValueConverter().Convert(null, null, null, null); Assert.IsInstanceOfType(converted, typeof(string)); Assert.AreEqual<string>(NullValueConverter.NullString, (string)converted); }
public void ShouldConvertProvidedValue() { object converted = new NullValueConverter().Convert("test", null, null, null); Assert.IsInstanceOfType(converted, typeof(string)); Assert.AreEqual<string>("test", (string)converted); }
public void ShouldConvertNullToParameterValue() { object converted = new NullValueConverter().Convert(null, null, "<null>", null); Assert.IsInstanceOfType(converted, typeof(string)); Assert.AreEqual("<null>", converted); }
public void ShouldConvertBackNullString() { object converted = new NullValueConverter().ConvertBack(NullValueConverter.NullString, null, null, null); Assert.IsNull(converted); }
public void ShouldConvertBackEmptyString() { object converted = new NullValueConverter().ConvertBack(string.Empty, null, null, null); Assert.IsNull(converted); }