示例#1
0
        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"));
        }
示例#2
0
        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"));
        }
示例#3
0
        public void Keep_Name_When_Empty()
        {
            ProcessRenamer ren = new ProcessRenamer();

            Assert.AreEqual("exe", ren.Rename("exe", "args"));
        }