Ejemplo n.º 1
0
        public void CreateTagUsesGivenArgs()
        {
            GitCreateTagArgs args = CreateDefaultArgs();

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

            _controller.CreateTag(args, null);
            _uiCommands.Received(1).StartCommandLineProcessDialog(Arg.Any <IGitCommand>(), null);
        }
Ejemplo n.º 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);
        }