Skip to content

Instantly share code, notes, and snippets.

@anurse anurse/IConsole.cs
Created May 18, 2012

Embed
What would you like to do?
BadImageFormatException - The signature is incorrect
public interface IConsole {
void WriteLine(string line);
}
public class Test {
[Fact]
public void DoodadWritesToConsole() {
// Arrange
var thingyMock = new Mock<Thingy>();
var doodad = new Doodad(thingyMock.Object);
// Act
doodad.DoAThing(writeToConsole: false);
// Assert
thingyMock.Verify(t => t.MakeConsole(), Times.Never());
}
}
public class Thingy {
public virtual IConsole MakeConsole() { return null; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.