Exemplo n.º 1
0
    public void CanPublish()
    {
      var cmd = new Revolver.Core.Commands.PublishItem();
      InitCommand(cmd);

      _context.CurrentItem = _publishableItem;

      var webDb = Sitecore.Configuration.Factory.GetDatabase("web");
      Assert.IsNull(webDb.GetItem(_context.CurrentItem.ID), "The item exists in the web DB already");

      var result = cmd.Run();
      WaitForPublish();

      Assert.AreEqual(CommandStatus.Success, result.Status);
      Assert.IsNotNull(webDb.GetItem(_context.CurrentItem.ID));
    }
Exemplo n.º 2
0
    public void StoppedByWorkflow()
    {
      var cmd = new Revolver.Core.Commands.PublishItem();
      InitCommand(cmd);

      _context.CurrentItem = _itemInWorkflow;

      var result = cmd.Run();

      Assert.AreEqual(CommandStatus.Failure, result.Status);
    }