Ejemplo n.º 1
0
        public void ExternalGetExternalHref_Returns_Value()
        {
            //arrange
            var asset = new MockFieldAccessor();

            asset["basename_link_type"]     = "External";
            asset["basename_link_external"] = "http://localhost/";

            var cplink = new CPLink(asset, "basename");

            //act
            var actual = cplink.GetExternalHref();

            //assert
            actual.Should().Be("http://localhost/");
        }
Ejemplo n.º 2
0
        public void ExternalToString_Returns_ExpectedToString()
        {
            //arrange
            var asset = new MockFieldAccessor();

            asset["basename_link_type"]     = "External";
            asset["basename_link_external"] = "http://localhost/";

            var cplink = new CPLink(asset, "basename");

            //act
            var actual = cplink.ToString();

            //assert
            actual.Should().Be("CPLink { Type=External Href=\"http://localhost/\" }");
        }