Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created March 31, 2018 10:56
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/de78c0f6c94db1da052e912724dd947d to your computer and use it in GitHub Desktop.
Save NMZivkovic/de78c0f6c94db1da052e912724dd947d to your computer and use it in GitHub Desktop.
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