常用方法
常用方法
常用方法
常用方法
public void Delete_CallsMock_Returns(bool mockReturn) { _deleteMock.Setup(x => x.Delete(_testingFriend.Id)) .Returns(mockReturn); var actualReturn = _friendService.Delete( _testingFriend.Id); _deleteMock.Verify(x => x.Delete(_testingFriend.Id), Times.Once); Assert.AreEqual(mockReturn, actualReturn); }