public void CreateUser_Success_Test() { //Arrange const int expectedReturnId = 0; _repositoryMock.Setup(r => r.Create(_storedUser)).Returns(Task.FromResult(expectedReturnId)); var userFacade = new UserAdapter(_repositoryMock.Object); //Act var actualId = userFacade.Create(_user); //Assert Assert.IsTrue(expectedReturnId == actualId.Result); }