public async Task When_ValueByIdIsCalled_Expect_ValueWithIdCalled() { // Arrange var guid = new Guid(); var expectValue = new Value { Id = guid, DateCreated = new DateTime(), DateModified = new DateTime(), Title = "Title", Message = "Message" }; // Expectations _valueRepositoryMock.Setup(x => x.GetById(It.IsAny <Guid>())).Returns(Task.FromResult(expectValue)); // Act var result = await _sut.GetValueByIdAsync(guid); // Assert Assert.Equal(result.Id, guid); Assert.NotNull(result.DateCreated); Assert.NotNull(result.DateModified); Assert.Equal(result.Title, expectValue.Title); Assert.Equal(result.Message, expectValue.Message); }