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)); }
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)); }
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")); }