public async Task GetPlayerTest() { int Playerid = 1; var Player = new Player() { PlayerId = Playerid }; var fakeRepositoryMock = new Mock <IPlayerRepository>(); fakeRepositoryMock.Setup(x => x.GetPlayer(Playerid)).ReturnsAsync(Player); var PlayerService = new PlayerServices(fakeRepositoryMock.Object); var resultPlayer = await PlayerService.GetPlayer(Playerid); Assert.Equal(Playerid, resultPlayer.PlayerId); }