Skip to content

Instantly share code, notes, and snippets.

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