コード例 #1
0
ファイル: Links.cs プロジェクト: KerwinMa/revolver
	  public void NoAdditionalLinks()
	  {
	    var cmd = new Cmd.Links();
      InitCommand(cmd);

	    _context.CurrentItem = _nolinks;

	    var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));

      // Even with no added links, the item will link to it's template
      Assert.That(result.Message, Contains.Substring(Constants.Paths.DocTemplate));
	  }
コード例 #2
0
ファイル: Links.cs プロジェクト: KerwinMa/revolver
    public void IncomingAndOutgoing_ShowIncomingOnly()
    {
      var cmd = new Cmd.Links();
      InitCommand(cmd);

      _context.CurrentItem = _inoutlink;
      cmd.ShowIncomingLinks = true;

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));

      Assert.That(result.Message, Is.Not.Contains(" out "));
      Assert.That(result.Message, Contains.Substring(_outlink.Paths.FullPath));
    }
コード例 #3
0
ファイル: Links.cs プロジェクト: KerwinMa/revolver
    public void OutgoingLink_Absolute()
    {
      var cmd = new Cmd.Links();
      InitCommand(cmd);

      _context.CurrentItem = _testRoot;
      cmd.ShowOutgoingLinks = true;
      cmd.Path = _outlink.Paths.FullPath;

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));

      // Even with no added links, the item will link to it's template
      Assert.That(result.Message, Contains.Substring(Constants.Paths.DocTemplate));
      Assert.That(result.Message, Contains.Substring(_inlink.Paths.FullPath));
    }
コード例 #4
0
ファイル: Links.cs プロジェクト: KerwinMa/revolver
    public void OutgoingLink_IdList()
    {
      var cmd = new Cmd.Links();
      InitCommand(cmd);

      _context.CurrentItem = _outlink;
      cmd.ShowOutgoingLinks = true;
      cmd.OutputIds = true;

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));

      Assert.That(result.Message, Is.Not.Contains(_inlink.Paths.FullPath));
      Assert.That(result.Message, Contains.Substring(_inlink.ID.ToString()));
    }
コード例 #5
0
ファイル: Links.cs プロジェクト: KerwinMa/revolver
    public void SourceField()
    {
      var cmd = new Cmd.Links();
      InitCommand(cmd);

      _context.CurrentItem = _inlink;
      cmd.OriginFieldName = "text";

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));

      // Even with no added links, the item will link to it's template
      Assert.That(result.Message, Is.Not.Contains(Constants.Paths.DocTemplate));
      Assert.That(result.Message, Contains.Substring(_outlink.Paths.FullPath));
    }
コード例 #6
0
ファイル: Links.cs プロジェクト: KerwinMa/revolver
    public void IncomingAndOutgoing_ShowOutgoingOnly()
    {
      var cmd = new Cmd.Links();
      InitCommand(cmd);

      _context.CurrentItem = _inoutlink;
      cmd.ShowOutgoingLinks = true;

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));

      // Even with no added links, the item will link to it's template
      Assert.That(result.Message, Contains.Substring(Constants.Paths.DocTemplate));
      Assert.That(result.Message, Is.Not.Contains(" in "));
      Assert.That(result.Message, Contains.Substring(_inlink.Paths.FullPath));
    }