Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using Moq;
using Xunit;
namespace ClientServiceExample
{
public class ClientTest
{
[Fact]
public void InitiateServiceMethod_NoConditions_ProperMethodsCalled()
{
var serviceMock = new Mock<IService>();
var client = new Client();
client.InitiateServiceMethod(serviceMock.Object);
serviceMock.Verify(x => x.ServiceMethod());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment