public void OnNavigatingFrom_ThrowsException_InvalidNavigationMode()
        {
            TestableNavigationStack navigationStack = new TestableNavigationStack();
            var e = Assert.Throws<ArgumentException>(() =>
            {
                navigationStack.OnNavigatingFrom(new PageInfo("Page 1", null), (PageNavigationMode)100);
            });

            Assert.Equal("The argument contains an undefined enumeration value.\r\nParameter name: navigationMode", e.Message);
            Assert.Equal("navigationMode", e.ParamName);
        }
        public void OnNavigatingFrom_ThrowsException_NullPageInfo()
        {
            TestableNavigationStack navigationStack = new TestableNavigationStack();
            var e = Assert.Throws<ArgumentNullException>(() =>
            {
                navigationStack.OnNavigatingFrom(null, PageNavigationMode.New);
            });

            Assert.Equal("Value cannot be null.\r\nParameter name: page", e.Message);
            Assert.Equal("page", e.ParamName);
        }