예제 #1
0
		public void FromHomeItem()
		{
      var cmd = new Cmd.PrintCurrentItem();
      base.InitCommand(cmd);

      _context.CurrentItem = _testRoot;
      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));
      Assert.That(result.Message, Is.EqualTo(_testRoot.Paths.FullPath));
		}
예제 #2
0
		public void WithInvalidParameter()
		{
      var cmd = new Cmd.PrintCurrentItem();
      base.InitCommand(cmd);

			_context.CurrentItem = _context.CurrentDatabase.GetRootItem();
			cmd.Path = "jfj";

      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Failure));
		}
예제 #3
0
		public void FromRootItem()
		{
			var cmd = new Cmd.PrintCurrentItem();
			base.InitCommand(cmd);

			_context.CurrentItem = _context.CurrentDatabase.GetRootItem();

			var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));
      Assert.That(result.Message, Is.EqualTo(@"/sitecore"));
		}