public void Invalid_value_and_target_type() { var converter = new TitleCornerRadiusConverter(); Assert.ThrowsException <InvalidOperationException>(() => converter.Convert(1, typeof(string), null, null)); }
public void Change_appropriate_radius_for_titlebar_from_irregular_input() { var converter = new TitleCornerRadiusConverter(); var res = converter.Convert(new CornerRadius(10, 12, 2, 0), typeof(CornerRadius), null, null); Assert.AreEqual(typeof(CornerRadius), res.GetType()); Assert.AreEqual(new CornerRadius(10, 12, 0, 0), (CornerRadius)res); }
public void Invalid_value() { var converter = new TitleCornerRadiusConverter(); Assert.ThrowsException <InvalidOperationException>(() => converter.Convert(1, typeof(CornerRadius), null, null)); Assert.ThrowsException <InvalidOperationException>(() => converter.Convert("hello", typeof(CornerRadius), null, null)); }