public void RegionDuplicateRemoverTest()
        {
            var priority = new List <string>
            {
                "(USA, Europe)",
                "(EU)",
                "(USA)",
                "[E]"
            };

            var files = new List <string>
            {
                "Game2 (EU)",
                "Game2 (USA, Europe)",
                "Mario Party DS (EU)",
                "Mario Party DS (USA)",
                "Mario Party DS [E]",
                "Mario Party DS",
                "Game1",
                "Game1 [J]",
                "Game 3 (Rev 1)",
                "Game 3 (EU)",
                "Game 3 (USA)",
                "/emulator/Game 3 (USA)"
            };

            var expectedFiles = new List <string>
            {
                "Game2 (EU)",
                "Mario Party DS (USA)",
                "Mario Party DS [E]",
                "Mario Party DS",
                "Game1 [J]", //this is removed over the non region game only because both of them aren't in the priority list so the first one is taken and all other ones will be removed
                "Game 3 (USA)"
            };

            var rd = new RegionDuplicateRemover();

            rd.dryRun(files, priority);

            Assert.IsTrue(rd.FilesToDelete.SequenceEqual(expectedFiles));
        }
Ejemplo n.º 2
0
        private void BtnRegion_Click(object sender, EventArgs e)
        {
            var model = new RegionDuplicateRemover();

            new DuplicateRemoverForm(model).Show();
        }