コード例 #1
0
    public void ShouldSetDataStorage()
    {
      // arrange
      var command = new DataEngineCommand();

      // act
      command.Initialize(this.dataStorage);

      // assert
      command.DataStorage.Should().Be(this.dataStorage);
    }
コード例 #2
0
    public void ShouldCreateInstance()
    {
      // arrange
      var command = new DataEngineCommand();
      command.Initialize(this.dataStorage);

      // act
      var newCommand = command.CreateInstance<Sitecore.Data.Engines.DataCommands.GetItemCommand, GetItemCommand>();

      // assert
      newCommand.Should().NotBeNull();
      newCommand.Should().BeAssignableTo<Sitecore.Data.Engines.DataCommands.GetItemCommand>();
      newCommand.Should().BeOfType<GetItemCommand>();
    }