Ejemplo n.º 1
0
        public void ConvertFromUriToResolutionAwareUri(int scaleFactor, string expectedValue)
        {
            var converter = new ResolutionAwareUriConverter(scaleFactor);

            var value = converter.Convert(TestValue, typeof(Uri), null, CultureInfo.CurrentCulture);

            Assert.IsNotNull(value);
            Assert.AreEqual(value.ToString(), expectedValue);
        }
Ejemplo n.º 2
0
        public void ConvertBackIsNotImplemented()
        {
            var converter = new ResolutionAwareUriConverter();

            Assert.ThrowsException <NotSupportedException>(() => converter.ConvertBack(null, typeof(Uri), null, CultureInfo.CurrentCulture));
        }