public void CreateLink_LinkIsFile() { //Arrange var convertToLink = new ConvertToLink("https://www.something.com/something.png", "https://www.something.com"); var expected = new Link { Url = "https://www.something.com/something.png", LinkType = LinkType.File, LinkSource = LinkSource.Internal }; //Act var actual = convertToLink.CreateLinkFromFullAddress("https://www.something.com/something.png", LinkSource.Internal); //Assert Assert.Equal(expected.LinkType, actual.LinkType); }
public void CreateLink_LinkIsPage(string link) { //Arrange var convertToLink = new ConvertToLink(link, "https://www.something.com"); var expected = new Link { Url = link, LinkType = LinkType.Page, LinkSource = LinkSource.Internal }; //Act var actual = convertToLink.CreateLinkFromFullAddress(link, LinkSource.Internal); //Assert Assert.Equal(expected.LinkType, actual.LinkType); }