public void TestMethod1() { var executeSetting = new ExecuteSetting("./"); executeSetting.ForWidnow(); var commandSet = new CommandSet(executeSetting); commandSet.Svn("svn_sample") .Url("http://svn.address.com/trunk") .Auth("username", "password") .Tags("tag1", "tab2") .WorkingCopy("workongfolder") .Tags("tag1", "tag2"); var manager = new SettingManager(); manager.Save(commandSet, "svn.ini", true); Assert.IsTrue(File.Exists("svn.ini")); var target = new CommandSet(new ExecuteSetting("./")); manager.ReadSetting(target, "svn.ini"); var setting = (SvnSetting)target.Settings.First(); Assert.AreEqual("http://svn.address.com/trunk", setting.Url); Assert.AreEqual("username", setting.UserName); Assert.AreEqual("password", setting.Password); Assert.AreEqual("tag1,tag2", String.Join(",", setting.Tags)); Assert.AreEqual("workongfolder", setting.WorkingCopy); Assert.AreEqual("svn_sample", setting.Id); }
private static void Run(CommandSet commandSet, FileInfo fullName) { try { if (!fullName.Exists) { Console.WriteLine(fullName.Name + " not found."); return; } var manager = new SettingManager(); ExistFile = manager.ReadSetting(commandSet, fullName.FullName); commandSet.OnCommandSettingChanged += commandSet_OnCommandSettingChanged; commandSet.Invoke(); } catch (AggregateException aggregateException) { foreach (CommandRunningException ex in aggregateException.InnerExceptions) { Console.WriteLine(ex.Message); Console.WriteLine(ex.ComandId); Console.WriteLine(ex.Command + " " + ex.Arguments); } } }