public void AddCharacterTest() { //Arrange CharacterCollection characterCollection = new CharacterCollection(new CharacterMemoryContext()); Character character = new Character(0, "John", DateTime.Now, "Paladin", 200); //Act characterCollection.AddCharacter(character); //Assert bool addCharacter = characterCollection.AddCharacter(character); Assert.AreEqual(addCharacter, true); }
public void AddCharacterNameTooLongTest() { //Arrange CharacterCollection characterCollection = new CharacterCollection(new CharacterMemoryContext()); Character character = new Character(0, Guid.NewGuid().ToString(), DateTime.Now, "Paladin", 200); //Act & Assert (Expects an Exception) characterCollection.AddCharacter(character); }
public void AddCharacterNoSpecializationTest() { //Arrange CharacterCollection characterCollection = new CharacterCollection(new CharacterMemoryContext()); Character character = new Character(0, "John", DateTime.Now, "", 200); //Act & Assert (Expects an Exception) characterCollection.AddCharacter(character); }
public void CreateCharacter() { string input = Validator.GetString("Name:"); CharacterType type = SetCharacterType(); CharacterModel character = new CharacterModel(input, type); ConsoleEventing.Success("Character created"); characterCollection.AddCharacter(character); }