public void AddCarnetValid() { //Arrange ClientDto c = new ClientDto { Name = "test", Surname = "test", Address = "test", Sex = Portal.Application.Helpers.Sex.Female, ContactData = "test", Email = "*****@*****.**" }; Guid fakeId = new Guid("046857a4-2f02-4876-a4ac-1dbe043868b7"); ClientController controller = GetMocks(); _mockClientS.Setup(x => x.UpdateProfile(fakeId, c)); _mockUserID.Setup(x => x.CurrentUserId).Returns(fakeId); //Act var result = controller.AddCarnet(c); //Assert _mockClientS.Verify(p => p.UpdateProfile(fakeId, c), Times.Once); Assert.IsTrue(result != null); }