public void remove_an_active_character_from_an_account() { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; newAccount.AddNewCharacter(Guid.NewGuid(), "Orgrim Doomhammer", 100, RaceFactory.Orc, FactionFactory.Horde, ClassFactory.Warrior); var idCharacter = newAccount.Characters[0].Id; // Act var result = newAccount.RemoveCharacter(idCharacter); // Assert Assert.IsTrue(result); Assert.AreEqual(newAccount.Characters.Where(c=> c.IsActive).Count(), 0); Assert.AreEqual(newAccount.Characters.Where(c => !c.IsActive).Count(), 1); }
public void when_account_has_one_lvl_55__then_it_can_create_death_knight(string name, int level, Race race, Faction faction, Class @class) { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; newAccount.AddNewCharacter(Guid.NewGuid(), "Cairne Bloodhoof", 100, RaceFactory.Tauren, FactionFactory.Horde, ClassFactory.Druid); // Act var result = newAccount.AddNewCharacter(Guid.NewGuid(),name , level, race, faction, @class); // Assert Assert.IsTrue(result); Assert.AreEqual(newAccount.Characters.Count(), 2); }
public void when_account_has_not_one_lvl_55__then_it_cannot_create_death_knight(string name, int level, Race race, Faction faction, Class @class) { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; // Act var result = newAccount.AddNewCharacter(Guid.NewGuid(),name , level, race, faction, @class); // Assert Assert.IsFalse(result); Assert.AreEqual(newAccount.Characters.Count(), 0); }
public void Except_BloodElves_all_can_be_warrior(string name, int level, Race race, Faction faction, Class @class) { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; // Act var result = newAccount.AddNewCharacter(Guid.NewGuid(),name , level, race, faction, @class); // Assert Assert.IsTrue(result); Assert.AreEqual(newAccount.Characters.Count(), 1); }
public void Human_Gnome_Orc_and_BloodElves_cannot_be_druid(string name, int level, Race race, Faction faction, Class @class) { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; // Act var result = newAccount.AddNewCharacter(Guid.NewGuid(),name , level, race, faction, @class); // Assert Assert.IsFalse(result); Assert.AreEqual(newAccount.Characters.Count(), 0); }
public void Worgen_and_Tauren_can_be_druid(string name, int level, Race race, Faction faction, Class @class) { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; // Act var result = newAccount.AddNewCharacter(Guid.NewGuid(),name , level, race, faction, @class); // Assert Assert.IsTrue(result); Assert.AreEqual(newAccount.Characters.Count(), 1); }
public void Human_Gnome_and_Worgen_do_not_belong_to_the_Horde(string name, int level, Race race, Faction faction, Class @class) { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; // Act var result = newAccount.AddNewCharacter(Guid.NewGuid(),name , level, race, faction, @class); // Assert Assert.IsFalse(result); Assert.AreEqual(newAccount.Characters.Count(), 0); }
public void Orc_Tauren_and_Blood_Elves_do_not_belong_to_the_Alliance(string name, int level, Race race, Faction faction, Class @class) { //arrange var newAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() }; // Act var result = newAccount.AddNewCharacter(Guid.NewGuid(),name , level, race, faction, @class); // Assert Assert.IsFalse(result); Assert.AreEqual(newAccount.Characters.Count(), 0); }
public void create_a_valid_character_on_an_empty_account() { // Arrange var wowAccount = new Account() { Id = Guid.NewGuid(), Characters = new List<Character>() { } }; // Act var result = wowAccount.AddNewCharacter(Guid.NewGuid(), "Cairne Bloodhoof", 100, RaceFactory.Tauren, FactionFactory.Horde, ClassFactory.Druid); // Assert Assert.IsTrue(result); Assert.AreEqual(wowAccount.Characters.Count(), 1); }