public void AddNewShowTest() { var newShow = new ShowDto { movieId = _context.Movies.Single(o => o.Title == "TEST_MOVIE_2").Id, roomId = _context.Rooms.Single(o => o.RoomName == "TEST_ROOM").Id, StartTime = "2019-12-20 10:00:00" }; var controller = new ShowController(_context); var result = controller.NewShow(newShow); var objectResult = Assert.IsType <OkResult>(result); Assert.Equal(_showDTOs.Count + 1, _context.Shows.Count()); Assert.Equal(200, objectResult.StatusCode); }