public void Register_ShouldNotAceptBadPath()
        {
            _NavigationBuilder.Should().NotBeNull();
            Action wf = () =>
            {
                _NavigationBuilder.Register <object>("javascript\\navigationk_1.html");
            };

            wf.ShouldThrow <Exception>();

            wf = () =>
            {
                _NavigationBuilder.RegisterAbsolute <object>("C:\\javascript\\navigationk_1.html");
            };
            wf.ShouldThrow <Exception>();

            wf = () =>
            {
                _NavigationBuilder.Register <object>(new Uri("C:\\navigationk_1.html"));
            };
            wf.ShouldThrow <Exception>();
        }
Esempio n. 2
0
        public void Test_WPFBrowserNavigator_Register_ShouldNotAceptBadPath()
        {
            _INavigationBuilder.Should().NotBeNull();
            Action wf = () =>
            {
                _INavigationBuilder.Register <A1>("javascript\\navigationk_1.html");
            };

            wf.ShouldThrow <Exception>();

            wf = () =>
            {
                _INavigationBuilder.RegisterAbsolute <A1>("C:\\javascript\\navigationk_1.html");
            };
            wf.ShouldThrow <Exception>();

            wf = () =>
            {
                _INavigationBuilder.Register <A1>(new Uri("C:\\navigationk_1.html"));
            };
            wf.ShouldThrow <Exception>();
        }