예제 #1
0
        public void ModNotExists()
        {
            var path = Path.Combine(_game.Directory.FullName, "Mods\\ModC");

            Assert.ThrowsException <PetroglyphModException>(() =>
                                                            ModFactory.CreateMod(_game, ModType.Default, path, false));
        }
예제 #2
0
        public void ModCreation()
        {
            var path = Path.Combine(_game.Directory.FullName, "Mods\\ModA");
            var mod  = ModFactory.CreateMod(_game, ModType.Default, path, false);

            Assert.IsNotNull(mod);
            Assert.AreEqual(ModType.Default, mod.Type);
            Assert.IsInstanceOfType(mod, typeof(Mod));
            Assert.AreEqual(path, ((Mod)mod).Directory.FullName);
        }
 public void CreateGame()
 {
     _game = new Foc(new DirectoryInfo(Path.Combine(TestScenariosPath, "FiveMods")), GameType.Disk);
     _modA = ModFactory.CreateMod(_game, ModType.Default, Path.Combine(_game.Directory.FullName, "Mods\\ModA"), false);
     _modB = ModFactory.CreateMod(_game, ModType.Default, Path.Combine(_game.Directory.FullName, "Mods\\ModB"), false);
     _modC = ModFactory.CreateMod(_game, ModType.Default, Path.Combine(_game.Directory.FullName, "Mods\\ModC"), false);
     _modD = ModFactory.CreateMod(_game, ModType.Default, Path.Combine(_game.Directory.FullName, "Mods\\ModD"), false);
     _modE = ModFactory.CreateMod(_game, ModType.Default, Path.Combine(_game.Directory.FullName, "Mods\\ModE"), false);
     _game.AddMod(_modA);
     _game.AddMod(_modB);
     _game.AddMod(_modC);
     _game.AddMod(_modD);
     _game.AddMod(_modE);
 }