public FakeLinkDatabaseTest() { this.item = ItemHelper.CreateInstance(this.database); this.behavior = Substitute.For <LinkDatabase>(); this.linkDatabase = new FakeLinkDatabase(); this.linkDatabase.LocalProvider.Value = this.behavior; }
public FakeLinkDatabaseTest() { this.item = ItemHelper.CreateInstance(this.database); this.behavior = Substitute.For<LinkDatabase>(); this.linkDatabase = new FakeLinkDatabase(); this.linkDatabase.LocalProvider.Value = this.behavior; }
public void ShouldReturnEmptyValuesWithoutBehaviorSet() { // arrange var stubLinkDatabase = new FakeLinkDatabase(); // act & assert stubLinkDatabase.Compact(null); stubLinkDatabase.GetBrokenLinks(null).Should().BeEmpty(); stubLinkDatabase.GetReferenceCount(null).Should().Be(0); stubLinkDatabase.GetReferences(null).Should().BeEmpty(); stubLinkDatabase.GetItemReferences(null, false).Should().BeEmpty(); stubLinkDatabase.GetReferrerCount(null).Should().Be(0); stubLinkDatabase.GetReferrers(null).Should().BeEmpty(); stubLinkDatabase.GetReferrers(null, null).Should().BeEmpty(); stubLinkDatabase.GetItemReferrers(null, false).Should().BeEmpty(); stubLinkDatabase.GetItemVersionReferrers(null).Should().BeEmpty(); stubLinkDatabase.GetReferrers(null).Should().BeEmpty(); stubLinkDatabase.HasExternalReferrers(null, false).Should().BeFalse(); stubLinkDatabase.Rebuild(null); stubLinkDatabase.RemoveReferences(null); stubLinkDatabase.UpdateItemVersionReferences(null); stubLinkDatabase.UpdateReferences(null); }