Example #1
0
        public void CreateTagWithMessageAssignsTagMessageFile()
        {
            var args = new GitCreateTagArgs(TagName, Revision, TagOperation.Annotate);

            _uiCommands.StartCommandLineProcessDialog(Arg.Do <IGitCommand>(
                                                          cmd =>
            {
                var createTagCmd = cmd as GitCreateTagCmd;
                Assert.AreEqual(_tagMessageFile, createTagCmd.TagMessageFileName);
            }
                                                          ), null);

            _controller.CreateTag(args, null);
            _uiCommands.Received(1).StartCommandLineProcessDialog(Arg.Any <IGitCommand>(), null);
        }
Example #2
0
        public void CreateTagWithMessageAssignsTagMessageFile()
        {
            GitCreateTagArgs args = CreateDefaultArgs();

            args.OperationType = TagOperation.Annotate;

            _uiCommands.StartCommandLineProcessDialog(Arg.Do <IGitCommand>(
                                                          cmd =>
            {
                GitCreateTagCmd createTagCmd = cmd as GitCreateTagCmd;
                Assert.AreEqual(Path.Combine(WorkingDir, "TAGMESSAGE"), createTagCmd.TagMessageFileName);
            }
                                                          ), null);

            _controller.CreateTag(args, null);
            _uiCommands.Received(1).StartCommandLineProcessDialog(Arg.Any <IGitCommand>(), null);
        }
        public void PassesCreatedArgsAndWindowToCommands()
        {
            var args   = CreateAnnotatedTagArgs();
            var window = CreateTestingWindow();

            _controller.CreateTag(args, window);

            _uiCommands.Received(1).StartCommandLineProcessDialog(
                window, Arg.Is <GitCreateTagCmd>(c => c.Arguments == args));
        }