public void ShouldCallIsItemContainedWithinBucket([Frozen] BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, Item item)
 {
   current.IsItemContainedWithinBucket(item).Returns(true);
   sut.IsItemContainedWithinBucket(item).Should().BeTrue();
 }
 public void IsItemContainedWithinBucketReturnsFalseIfNoCurrentProvider(SwitchingBucketProvider sut, Item item)
 {
   sut.IsItemContainedWithinBucket(item).Should().BeFalse();
 }
 public void ShouldCallGetFacets([Frozen] BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, List<SearchStringModel> searchQuery, string locationFilter, IList<IEnumerable<SitecoreUIFacet>> expected)
 {
   current.GetFacets(searchQuery, locationFilter).Returns(expected);
   sut.GetFacets(searchQuery, locationFilter).Should().BeSameAs(expected);
 }
 public void ShouldGetEmptyFacetsIfNoCurrentProvider(SwitchingBucketProvider sut, List<SearchStringModel> searchQuery, string locationFilter, IList<IEnumerable<SitecoreUIFacet>> expected)
 {
   sut.GetFacets(searchQuery, locationFilter).Should().BeEmpty();
 }
 public void ShouldCallCopyItem([Frozen]BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, Item source, Item target, bool deep)
 {
   sut.CopyItem(source, target, deep);
   current.Received().CopyItem(source, target, deep);
 }
 public void ShouldCallCreateBucket([Frozen] BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, Item item, Action<Item> callBack)
 {
   sut.CreateBucket(item, callBack);
   current.Received().CreateBucket(item, callBack);
 }
 public void ShouldCallAddSearchTabToItem([Frozen]BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, Item item)
 {
   sut.AddSearchTabToItem(item);
   current.Received().AddSearchTabToItem(item);
 }
 public void ShouldCallCloneItem([Frozen]BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, Item source, Item target, bool deep, Item expected)
 {
   current.CloneItem(source, target, deep).Returns(expected);
   sut.CloneItem(source, target, deep).Should().BeSameAs(expected);
 }
 public void ShouldBeBucketProvider(SwitchingBucketProvider sut)
 {
   sut.Should().BeAssignableTo<BucketProvider>();
 }
 public void ShouldCallSyncBucket([Frozen] BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, Item item)
 {
   sut.SyncBucket(item);
   current.Received().SyncBucket(item);
 }
 public void ShouldCallMoveItemIntoBucket([Frozen] BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, Item source, Item target)
 {
   sut.MoveItemIntoBucket(source, target);
   current.Received().MoveItemIntoBucket(source, target);
 }
 public void IsTemplateBucketableReturnsFalseIfNoCurrentProvider(SwitchingBucketProvider sut, ID tempalteId, Database database)
 {
   sut.IsTemplateBucketable(tempalteId, database).Should().BeFalse();
 }
 public void ShouldCallIsTemplateBucketable([Frozen] BucketProvider current, BucketProviderSwitcher switcher, SwitchingBucketProvider sut, ID templateId, Database database)
 {
   current.IsTemplateBucketable(templateId, database).Returns(true);
   sut.IsTemplateBucketable(templateId, database).Should().BeTrue();
 }