Inherits from HyperLink. Allows one to set a CSS class that applies when the current request matches the NavigateUrl of this link.
Inheritance: System.Web.UI.WebControls.HyperLink
Esempio n. 1
0
        public void IsRequestForSamePage_WithRequestForDirectoryWithMatchingNavigateUrl_ReturnsTrue()
        {
            // arrange
            var navigationLink = new NavigationLink();

            // act
            bool isSamePage = navigationLink.IsRequestForSamePage("/Foo/Bar/", "/Foo/Bar/");

            // assert
            Assert.IsTrue(isSamePage);
        }
Esempio n. 2
0
        public void IsRequestForSamePage_WithRequestForRootAndNavigateUrlAsSlash_ReturnsTrue()
        {
            // arrange
            var navigationLink = new NavigationLink();

            // act
            bool isSamePage = navigationLink.IsRequestForSamePage("/", "/");

            // assert
            Assert.IsTrue(isSamePage);
        }
Esempio n. 3
0
        public void IsRequestForSamePage_WithRequestForDefaultAspxRootAndNavigateUrlAsSlash_ReturnsTrue()
        {
            // arrange
            var navigationLink = new NavigationLink { NavigateUrl = "~/" };

            // act
            bool isSamePage = navigationLink.IsRequestForSamePage("/", "/Default.aspx");

            // assert
            Assert.IsTrue(isSamePage);
        }