public void Substring_Match_Forces_Rename() { ProcessRenamer ren = new ProcessRenamer(); ren.ProcessRenamers.Add(new ProcessRenamer.RenameRule("exe", new List <string> { "ind" }, null, "NewExe")); Assert.AreEqual("NewExe", ren.Rename("exe", "-index")); Assert.AreEqual("somethingElse", ren.Rename("somethingElse", "-index")); }
public void Substring_Match_Is_And_Wise() { ProcessRenamer ren = new ProcessRenamer(); ren.ProcessRenamers.Add(new ProcessRenamer.RenameRule("exe", new List <string> { "-index", "-second" }, null, "NewExe")); Assert.AreEqual("exe", ren.Rename("exe", "-index")); Assert.AreEqual("exe", ren.Rename("exe", "-second")); Assert.AreEqual("NewExe", ren.Rename("exe", "-second -index")); }
public void Keep_Name_When_Empty() { ProcessRenamer ren = new ProcessRenamer(); Assert.AreEqual("exe", ren.Rename("exe", "args")); }