public async Task AutoBattleEngine_CreateCharacterParty_Valid_Characters_Should_Assign_6() { //Arrange AutoBattleEngine.Battle.EngineSettings.MaxNumberPartyCharacters = 6; CharacterIndexViewModel.Instance.Dataset.Clear(); await CharacterIndexViewModel.Instance.CreateAsync(new CharacterModel { Name = "1" }); await CharacterIndexViewModel.Instance.CreateAsync(new CharacterModel { Name = "2" }); await CharacterIndexViewModel.Instance.CreateAsync(new CharacterModel { Name = "3" }); await CharacterIndexViewModel.Instance.CreateAsync(new CharacterModel { Name = "4" }); await CharacterIndexViewModel.Instance.CreateAsync(new CharacterModel { Name = "5" }); await CharacterIndexViewModel.Instance.CreateAsync(new CharacterModel { Name = "6" }); await CharacterIndexViewModel.Instance.CreateAsync(new CharacterModel { Name = "7" }); //Act var result = AutoBattleEngine.CreateCharacterParty(); var count = AutoBattleEngine.Battle.EngineSettings.CharacterList.Count(); var name = AutoBattleEngine.Battle.EngineSettings.CharacterList.ElementAt(5).Name; //Reset CharacterIndexViewModel.Instance.ForceDataRefresh(); //Assert Assert.AreEqual(6, count); Assert.AreEqual("6", name); }
public async Task AutoBattleEngine_CreateCharacterParty_Characters_Should_Assign_6() { //Arrange Engine.MaxNumberPartyCharacters = 6; CharacterViewModel.Instance.Dataset.Clear(); await CharacterViewModel.Instance.CreateAsync(new BaseCharacter { Name = "1" }); await CharacterViewModel.Instance.CreateAsync(new BaseCharacter { Name = "2" }); await CharacterViewModel.Instance.CreateAsync(new BaseCharacter { Name = "3" }); await CharacterViewModel.Instance.CreateAsync(new BaseCharacter { Name = "4" }); await CharacterViewModel.Instance.CreateAsync(new BaseCharacter { Name = "5" }); await CharacterViewModel.Instance.CreateAsync(new BaseCharacter { Name = "6" }); await CharacterViewModel.Instance.CreateAsync(new BaseCharacter { Name = "7" }); //Act var result = Engine.CreateCharacterParty(); //Reset //Assert Assert.AreEqual(6, Engine.CharacterList.Count()); Assert.AreEqual("6", Engine.CharacterList.ElementAt(5).Name); }
public void AutoBattleEngine_CreateCharacterParty_Party_Default_Should_Pass() { // Arrange // Act var result = AutoBattleEngine.CreateCharacterParty(); // Reset // Assert Assert.IsTrue(result); }