Ejemplo n.º 1
0
        public void AddParams_WithoutParams_PreservesUrl()
        {
            // Arrange
            var    virtualPathBuilder = new VirtualPathBuilder();
            string urlWithoutParams   = "/sfLayouts/test.master";

            // Act
            string resultUrl = virtualPathBuilder.AddParams(urlWithoutParams, string.Empty);

            // Assert
            Assert.AreEqual(urlWithoutParams, resultUrl, "The URL has been changed.");
        }
Ejemplo n.º 2
0
        public void AddParams_WithParams_AddsParams()
        {
            // Arrange
            var    virtualPathBuilder = new VirtualPathBuilder();
            string urlWithParams      = "/sfLayouts/test.master#someParam.master";
            string url = "/sfLayouts/test.master";

            // Act
            string resultUrl = virtualPathBuilder.AddParams(url, "someParam");

            // Assert
            Assert.AreEqual(urlWithParams, resultUrl, "The parameters are not added correctly from the URL.");
        }