public async Task Put_Term_Success() { var term = new Term { Id = "001", Name = "A", StartDate = DateTime.Now, EndDate = DateTime.Now.AddMonths(3), UniversityId = "001" }; _context.Terms.Add(term); _context.SaveChanges(); term.Name = "B"; term.EndDate = DateTime.Now.AddMonths(6); var result = await _controller.PutTerm(term.Id, term); Assert.IsType <NoContentResult>(result); Assert.Equal(term, _context.Terms.Find(term.Id)); }