Skip to content

Instantly share code, notes, and snippets.

@PiotrPerak
Last active November 23, 2018 09:39
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 PiotrPerak/4dc8f000e77bca0262b2d91373a528c7 to your computer and use it in GitHub Desktop.
Save PiotrPerak/4dc8f000e77bca0262b2d91373a528c7 to your computer and use it in GitHub Desktop.
private TestedObject testedObject;
private IDependency depency;
[SetUp]
public void Setup()
{
var dependency = new Mock<IDependency>();
// dependency setup
testedObject = new TestedObject(depency.object);
}
[Test]
public void It_works_with_dependencies()
{
var result = testedObject.WorkWithDependency();
// assert result
dependency.Verify(d => d.WasNotified());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment