Exemplo n.º 1
0
        public void DeleteRepoTest()
        {
            var service  = new RepoService(_dbContext, _projectService.Object);
            var fakeUser = _dbContext.Users.FirstOrDefault(user => user.UserName == "Mario");

            service.CreateRepo(fakeUser, 998, "RepoToDelete", "Test repo", "http://dev.to");
            var res = service.DeleteRepo(_dbContext.Repositories.FirstOrDefault(repo => repo.Id == 998));

            Assert.AreEqual(true, res.Result);
        }