public void Should_replace_the_url_for_the_link_with_specified_id() { var sut = new StoreLinksInMemory(); sut.WithIdAndUrl("id", new Uri("http://existing.com")); var newUrl = new Uri("http://example.com"); sut.WithIdAndUrl("id", newUrl); sut.WithId("id")?.Href.Should().Be(newUrl); }
public void Should_save_a_link_with_the_specified_id() { var sut = new StoreLinksInMemory(); sut.WithIdAndUrl("id", new Uri("http://example.com")); sut.WithId("id").Should().NotBeNull(); }
public void Should_save_a_link_with_the_specified_url() { var sut = new StoreLinksInMemory(); var url = new Uri("http://example.com"); sut.WithIdAndUrl("id", url); sut.WithId("id")?.Href.Should().Be(url); }