public void TakeBotsWellTest() { BotsLoader loader = new BotsLoader(); loader.Load("../../../../Plugins/Dlls/Bots.dll"); (List <IPlayer>, List <string>)bots = loader.TakeBots(); Assert.AreEqual(3, bots.Item1.Count); Assert.AreEqual(3, bots.Item2.Count); Assert.IsTrue(bots.Item2.Contains("HalvesBot")); Assert.IsTrue(bots.Item2.Contains("PlusMinusBot")); Assert.IsTrue(bots.Item2.Contains("StandartBot")); }
public void TakeBotsBadlyTest() { BotsLoader loader = new BotsLoader(); loader.Load("../../../../Plugins"); (List <IPlayer>, List <string>)bots = loader.TakeBots(); Assert.AreEqual(0, bots.Item1.Count); Assert.AreEqual(0, bots.Item2.Count); Assert.IsFalse(bots.Item2.Contains("HalvesBot")); Assert.IsFalse(bots.Item2.Contains("PlusMinusBot")); Assert.IsFalse(bots.Item2.Contains("StandartBot")); }
private static void PlayWithPlugins(string?path) { BotsLoader loader = new BotsLoader(); CasinoLaunch casino; (List <IPlayer>, List <string>)bots; int length = loader.Load(path); bots = loader.TakeBots(); for (int i = 0; i < length; i++) { casino = new CasinoLaunch(bots.Item1[i], bots.Item2[i]); casino.StartCasino(); casino.PrintInfo(); } }