Exemple #1
0
        public void ThrowsExceptionOnUnknownRoute(object route)
        {
            // prepare
            var router = new UwpImageRouter();
            var mock   = new Mock <IPlatformSpecificExtension>();
            var ims    = new SealedToastImageSource(new Uri("https://www.example.com/some.png"));

            // act && verify
            Assert.Throws <InvalidOperationException>(() => router.Configure(mock.Object, ims, (Router.Route)route));
        }
Exemple #2
0
        public void Configure()
        {
            // prepare
            var uri    = new Uri("https://www.example.com/some.png");
            var router = new UwpImageRouter();
            var mock   = new Mock <IPlatformSpecificExtension>();
            var ims    = new SealedToastImageSource(uri);

            // act
            router.Configure(mock.Object, ims, Router.Route.Default);

            // verify
            mock.Assert(_ => _.AddAppLogoOverride(uri, null, null, null));
        }