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); } }
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()); }
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()); }
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()); }
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()); }