Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created April 7, 2018 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/7886d33ecbf9c1e66e7df13132f1db02 to your computer and use it in GitHub Desktop.
Save NMZivkovic/7886d33ecbf9c1e66e7df13132f1db02 to your computer and use it in GitHub Desktop.
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