public void TeamExistsTest() { int TeamId = 1; var fakeRepositoryMock = new Mock <IteamRepository>(); fakeRepositoryMock.Setup(x => x.TeamExists(TeamId)).Returns(true); var TeamService = new TeamServices(fakeRepositoryMock.Object); var isExist = TeamService.TeamExists(TeamId); Assert.True(isExist); }