示例#1
0
        public async Task AddCharacter_Valid_Character()
        {
            var game      = GameUtility.Create(dbContext, 0, 0);
            var imageFile = Substitute.For <IFormFile>();

            var character = await testObj.AddCharacter(game.ID, null, "Char1", imageFile);

            Assert.IsNotNull(character);
        }
        private async void AddToGame(List <String> gameIds, Character character)
        {
            if (gameIds == null || gameIds.Count <= 0)
            {
                return;
            }

            foreach (var gameId in gameIds)
            {
                await _gameService.AddCharacter(gameId, character);
            }
        }