public void PlayerExistsTest() { int PlayerId = 1; var fakeRepositoryMock = new Mock <IPlayerRepository>(); fakeRepositoryMock.Setup(x => x.PlayerExists(PlayerId)).Returns(true); var PlayerService = new PlayerServices(fakeRepositoryMock.Object); var isExist = PlayerService.PlayerExists(PlayerId); Assert.True(isExist); }