public async Task DemoteRank_Should_Decrease_Rank_Correctly() { using var context = await this.GetDatabase(); var mapper = this.GetMapper(); var characterService = new CharacterService(context, mapper); var raidService = new RaidService(context, characterService, mapper); var guildService = new GuildService(null, context, raidService, characterService, mapper); await guildService.DemoteRankAsync("2"); var expected = "1"; var actual = context.Characters.First(ch => ch.Id == "2").RankId; Assert.Equal(expected, actual); }