System\Windows\Input\ModifierKeysValueSerializerTests.cs (9)
31Assert.Equal(expected, serializer.CanConvertToString(value, new CustomValueSerializerContext()));
40Assert.Equal(expected, serializer.ConvertToString(key, new CustomValueSerializerContext()));
49Assert.Throws<InvalidEnumArgumentException>("value", () => serializer.ConvertToString(key, new CustomValueSerializerContext()));
64Assert.Throws<NullReferenceException>(() => serializer.ConvertToString(value, new CustomValueSerializerContext()));
75Assert.Throws<InvalidCastException>(() => serializer.ConvertToString(value, new CustomValueSerializerContext()));
91Assert.True(serializer.CanConvertFromString(value, new CustomValueSerializerContext()));
100Assert.Equal(expected, serializer.ConvertFromString(value, new CustomValueSerializerContext()));
108Assert.Throws<NotSupportedException>(() => serializer.ConvertFromString(null, new CustomValueSerializerContext()));
117Assert.Throws<NotSupportedException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));