public async Task Given_CreateGrade_When_ModelIsValid_Then_OkStatusCode() { // Arrange var Guid = new Guid("ef7e98df-26ed-4b21-b874-c3a2815d18ac"); var Id = Task.FromResult(Guid); mockRepo.Setup(g => g.CreateNew(createGradeModel)).Returns(Id); // Act var Result = (OkObjectResult)await controller.CreateGrade(createGradeModel); // Assert Assert.IsType <OkObjectResult>(Result); Assert.Equal(Id.Result, Result.Value); }