Inheritance: Sitecore.Data.Engines.DataCommands.AddFromTemplateCommand, IDataEngineCommand
    public void ShouldCreateDefaultCreator()
    {
      // arrange
      var command = new AddFromTemplateCommand();
      command.Initialize(this.innerCommand);

      // act & assert
      command.ItemCreator.Should().NotBeNull();
      command.ItemCreator.DataStorage.Should().Be(this.dataStorage);
    }
    public void ShouldReturnCreatedItem(AddFromTemplateCommand sut, Item item, Item destination)
    {
      // arrange
      sut.DataStorage.GetSitecoreItem(item.ID, item.Language).Returns(item);
      sut.Initialize(item.Name, item.TemplateID, destination, item.ID);

      // act
      var result = ReflectionUtil.CallMethod(sut, "DoExecute");

      // assert
      result.Should().Be(item);
    }
    public void ShouldAddFakeItem(AddFromTemplateCommand sut, string name, ID templateId, Item destination, ID newId)
    {
      // arrange
      sut.Initialize(name, templateId, destination, newId);

      // act
      ReflectionUtil.CallMethod(sut, "DoExecute");

      // assert
      sut.DataStorage.Received().AddFakeItem(Arg.Is<DbItem>(i => i.Name == name &&
                                                                 i.ID == newId &&
                                                                 i.TemplateID == templateId &&
                                                                 i.ParentID == destination.ID));
    }