public async Task PostSurveyAsync_AddNewSurvey() { var survey = new Survey(); var returnSurvey = new Survey { Id = survey.Id++ }; _mockMyDbContext.Setup( db => db.AddSurveyAsync(survey)).Returns(Task.FromResult(returnSurvey)); var surveysController = new SurveysController(_mockMyDbContext.Object); var response = await surveysController.PostSurveyAsync(survey); Assert.NotEqual(survey.Id, response.Value.Id); }