public void ConvertBack_PassedAnyValue_ShouldThrow() { // Arrange var converter = new KeyToDisplayStringConverter(); // Act/Assert Assert.Throws <NotImplementedException>(() => converter.ConvertBack(Key.A, typeof(string), null, CultureInfo.CurrentCulture)); }
public void Convert_PassedUnknownValue_ShouldThrow() { // Arrange var converter = new KeyToDisplayStringConverter(); // Act/Assert Assert.Throws <ArgumentException>(() => converter.Convert("dummy", typeof(string), null, CultureInfo.CurrentCulture)); }
public void Convert_PassedUnknownValue_ShouldReturnEmpty() { // Arrange var converter = new KeyToDisplayStringConverter(); // Act var result = converter.Convert("dummy", typeof(string), null, CultureInfo.CurrentCulture); // Assert Assert.Equal(string.Empty, result); }
public void Convert_PassedKnownValue_ShouldReturnCorrectValue(Key input, string expected) { // Arrange var converter = new KeyToDisplayStringConverter(); // Act var result = converter.Convert(input, typeof(string), null, CultureInfo.CurrentCulture); // Assert Assert.Equal(expected, result); }