Exemple #1
0
 public void ParseGetStatusCommandLine()
 {
     using (new ProcessControllerFactoryRestorer(new FakeProcessControlFactory()))
     {
         var processControl = new FakeProcessObserver<StatusChangeInfo>();
         var options = new StatusOptions {FindAdded = true, FindLocallyDeleted = true};
         Plastic.GetStatus(null, @"b:\cm\build", options, processControl, CancellationToken.None);
         Assert.AreEqual(@"cm.exe status --xml --encoding=utf-8 --added --localdeleted ", processControl.CommandLine);
         Assert.AreEqual(@"b:\cm\build", processControl.WorkingDir);
     }
 }
Exemple #2
0
        public void StatusOptionAllTest()
        {
            var opt = new StatusOptions {All = true};
            Assert.AreEqual(" --all", opt.ToString());

            opt = new StatusOptions
            {
                ControlledChanged = true,
                FindChanged = true,
                CalculateLocalMoves = true,
                FindLocallyDeleted = true,
                FindPrivates = true
            };
            Assert.AreEqual(" --all", opt.ToString());
        }
Exemple #3
0
        public void StatusOptionControlledChangedTest()
        {
            var opt = new StatusOptions {ControlledChanged = true};
            Assert.AreEqual(" --controlledchanged", opt.ToString());

            opt = new StatusOptions
            {
                FindAdded = true,
                FindCheckouts = true,
                FindCopied = true,
                FindReplaced = true,
                FindDeleted = true,
                FindMoved = true
            };
            Assert.AreEqual(" --controlledchanged", opt.ToString());
        }
Exemple #4
0
        public void StatusOptionHiddenChangedTest()
        {
            var opt = new StatusOptions {FindHiddenChanges = true};
            Assert.AreEqual(" --hiddenchanged", opt.ToString());

            opt = new StatusOptions {ShowHiddenChanges = true, FindChanged = true, FindCopied = true};
            Assert.AreEqual(" --copied --hiddenchanged", opt.ToString());
        }
Exemple #5
0
 public void StatusOptionMixedOptionsTest()
 {
     var opt = new StatusOptions
     {
         FindAdded = true,
         AllowChangesPerUnit = 0.4,
         BinaryAnyExtension = true,
         FindChanged = true,
         CalculateLocalMoves = true
     };
     Assert.AreEqual(" --added --changed --localmoved --binanyext --percentofsimilarity=0.4", opt.ToString());
 }