public void ConvertRGBIntToColor(int rgb, uint argb) { var converter = new MvxRGBIntColorValueConverter(); var actual = converter.Convert(rgb, typeof(object), null, CultureInfo.CurrentUICulture); var wrapped = actual as WrappedColor; Assert.NotNull(wrapped); Assert.Equal(argb, (uint)wrapped.Color.ARGB); }
private static void RunTests(int[] tests, uint[] results) { for (var i = 0; i < tests.Length; i++) { var converter = new MvxRGBIntColorValueConverter(); var actual = converter.Convert(tests[i], typeof(object), null, CultureInfo.CurrentUICulture); var wrapped = actual as WrappedColor; Assert.IsNotNull(wrapped); Assert.AreEqual(results[i], (uint)wrapped.Color.ARGB); } }
private static void RunTests(int[] tests, uint[] results) { for (var i = 0; i < tests.Length; i++) { var converter = new MvxRGBIntColorValueConverter(); var actual = converter.Convert(tests[i], typeof(object), null, CultureInfo.CurrentUICulture); var wrapped = actual as WrappedColor; Assert.IsNotNull(wrapped); Assert.AreEqual(results[i], (uint)wrapped.Color.ARGB); } }