public void CheckForValidInputs()
 {
     Assert.AreEqual(
         1,
         CommandCompareHeuristic.CompareCommands(SmallerCommand, GreaterCommand),
         "Commands are not compared as expected!");
 }
        public static SortedCommandPair NewSortedPair(string command1, string command2)
        {
            switch (CommandCompareHeuristic.CompareCommands(command1, command2))
            {
            case 1:
                return(new SortedCommandPair(command1, command2));

            case -1:
                return(new SortedCommandPair(command2, command1));

            default:
                return(String.Compare(command1, command2, StringComparison.InvariantCulture) > 0
                        ? new SortedCommandPair(command2, command1)
                        : new SortedCommandPair(command1, command2));
            }
        }
 public void CompareCommandsTest(string command1, string command2, int expected)
 {
     Assert.AreEqual(CommandCompareHeuristic.CompareCommands(command1, command2), expected);
 }
 public void ShouldIdentifyOtherCommands()
 {
     Assert.IsFalse(CommandCompareHeuristic.IsOtherCommand(VisualStudioCommand));
     Assert.IsFalse(CommandCompareHeuristic.IsOtherCommand(ReSharperCommand));
     Assert.IsTrue(CommandCompareHeuristic.IsOtherCommand(OtherCommand));
 }