public void AddPowerTest() { //Arrange powerRepositoryMock.Setup(x => x.Insert(It.IsAny <Power>())) .Verifiable("should insert into repository!!!"); unitOfWorkMock.Setup(x => x.Save()) .Verifiable("should save after insert"); var powerDto = new PowerDTO(); //Act var addedPower = powerService.AddPower(powerDto); //Assert Assert.IsNotNull(addedPower); unitOfWorkMock.Verify(); powerRepositoryMock.Verify(); }