Ejemplo n.º 1
0
        public void Will_Not_Execute_EditRemoveAndSort_Command_If_Not_CS_File(
            [Frozen] DTE2 dte,
            RemoveAndSortUsingsCommand sut,
            string filePath,
            ITextView textView)
        {
            sut.Execute(
                filePath + ".txt",
                textView);

            dte
            .DidNotReceive()
            .ExecuteCommand(
                Arg.Any <string>(),
                Arg.Any <string>());
        }
Ejemplo n.º 2
0
        public void Will_Execute_EditRemoveAndSort_Command_On_DTE(
            [Frozen] DTE2 dte,
            RemoveAndSortUsingsCommand sut,
            string filePath,
            ITextView textView)
        {
            sut.Execute(
                filePath + ".cs",
                textView);

            dte
            .Received(1)
            .ExecuteCommand(
                "Edit.RemoveAndSort",
                string.Empty);
        }
Ejemplo n.º 3
0
        public void Will_Not_Execute_EditRemoveAndSort_Command_If_TextView_Contains_Compiler_IfDirective(
            [Frozen] DTE2 dte,
            RemoveAndSortUsingsCommand sut,
            string filePath,
            ITextView textView,
            ITextSnapshot snapshot)
        {
            textView.TextSnapshot.Returns(snapshot);
            snapshot.GetText().Returns("#if");

            sut.Execute(
                filePath + ".cs",
                textView);

            dte
            .DidNotReceive()
            .ExecuteCommand(
                Arg.Any <string>(),
                Arg.Any <string>());
        }