public void GetModificationsWhenApplyLabelIsDisabledDoesNotCreateLabels()
        {
            ProcessResult result = new ProcessResult("", string.Empty, 0, false);

            Modification[] dummyArray = new Modification[1] {
                new Modification()
            };
            _historyParser.SetupResult("Parse", dummyArray, typeof(TextReader), typeof(DateTime), typeof(DateTime));
            _executor.ExpectAndReturn("Execute", result, new IsTypeOf(typeof(ProcessInfo)));
            _executor.ExpectNoCall("Execute", typeof(ProcessInfo));

            _vss.GetModifications(IntegrationResultMother.CreateSuccessful(DateTime.Now), IntegrationResultMother.CreateSuccessful(DateTime.Now));
        }
Пример #2
0
        public void GetModificationsWhenApplyLabelIsDisabledDoesNotCreateLabels()
        {
            ProcessResult result = new ProcessResult("", string.Empty, 0, false);

            Modification[] dummyArray = new Modification[1] {
                new Modification()
            };
            _historyParser.Setup(parser => parser.Parse(It.IsAny <TextReader>(), It.IsAny <DateTime>(), It.IsAny <DateTime>())).Returns(dummyArray).Verifiable();
            _executor.Setup(executor => executor.Execute(It.IsAny <ProcessInfo>())).Returns(result).Verifiable();

            _vss.GetModifications(IntegrationResultMother.CreateSuccessful(DateTime.Now), IntegrationResultMother.CreateSuccessful(DateTime.Now));

            _executor.Verify();
            _executor.VerifyNoOtherCalls();
        }
Пример #3
0
        public void VerifyHistoryProcessInfoArguments()
        {
            string tempOutputFileName = Path.GetTempFileName();

            ExpectToExecuteArguments(string.Format(System.Globalization.CultureInfo.CurrentCulture, "history $/fooProject -R -Vd{0}~{1} \"-YJoe Admin,admin\" -I-Y {2}",
                                                   CommandDate(today),
                                                   CommandDate(yesterday),
                                                   GeneratePath("-O@{0}", tempOutputFileName)));
            vss.GetModifications(IntegrationResultMother.CreateSuccessful(yesterday), IntegrationResultMother.CreateSuccessful(today), tempOutputFileName);
        }