Beispiel #1
0
        public void ShouldCopyTo([Frozen] DbItem item, [Greedy] DbItemChildCollection sut)
        {
            var array = new DbItem[3];

            sut.CopyTo(array, 0);

            array.Should().Contain(item);
        }
    public void ShouldCopyTo([Frozen]DbItem item, [Greedy]DbItemChildCollection sut)
    {
      var array = new DbItem[3];

      sut.CopyTo(array, 0);

      array.Should().Contain(item);
    }
    public void ShouldCopyTo([Frozen]DbItem item, [Greedy]DbItemChildCollection sut)
    {
      // arrange
      var array = new DbItem[3];

      // act
      sut.CopyTo(array, 0);

      // assert
      array.Should().Contain(item);
    }
        public void ShouldDeserializeDescendants()
        {
            DsDbItem item = new DsDbItem("/sitecore/content/home", true);

            using (new Db()
            {
                item
            })
            {
                item.Should().NotBeNull();

                DbItem child = item.Children.FirstOrDefault(c => c.Name == "Child Item");
                child.Should().NotBeNull();
                child.Name.Should().BeEquivalentTo("Child Item");

                DbItem grandChild = child.Children.FirstOrDefault(c => c.Name == "Grandchild Item");
                grandChild.Should().NotBeNull();
                grandChild.Name.Should().BeEquivalentTo("Grandchild Item");
            }
        }