public void FindRepoTest() { var service = new RepoService(_dbContext, _projectService.Object); var repo = service.FindRepo(1); Assert.AreEqual(1, repo.Result.Id); Assert.AreEqual("MarioKart", repo.Result.Name); }
public void CreateRepoTest() { var service = new RepoService(_dbContext, _projectService.Object); var fakeUser = _dbContext.Users.FirstOrDefault(user => user.UserName == "Mario"); service.CreateRepo(fakeUser, 999, "RepoFromHell", "Test repo", "http://2ip.ru"); var repo = service.FindRepo(999); Assert.AreEqual("RepoFromHell", repo.Result.Name); Assert.AreEqual("Test repo", repo.Result.Description); }