Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created July 13, 2018 21:34
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 gdyrrahitis/9b9a40e6efdf1ec51ac2f46fe80745d4 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/9b9a40e6efdf1ec51ac2f46fe80745d4 to your computer and use it in GitHub Desktop.
[Test]
public void DoWork_VerifyParentWorkAndChildWorkCalls_Test () {
// Arrange
_parentMock.Setup (m => m.ParentWork ()).Verifiable ();
_parentMock.As<IChildInterface> ().Setup (m => m.ChildWork ()).Verifiable ();
var implementor = new Implementor (_parentMock.Object);
// Act
implementor.DoWork ();
// Assert
_parentMock.Verify (m => m.ParentWork (), Times.Once ());
_parentMock.As<IChildInterface> ().Verify (m => m.ChildWork (), Times.Once ());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment