This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void SomeTest() { | |
// Arrange | |
var mock = new Mock<IDependency>(); | |
string string1 = null; | |
string string2 = null; | |
mock | |
.Setup(x => x.AMethodCall(It.IsAny<string>(), It.IsAny<string>())) | |
.Callback<string, string>((s1, s2) => | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void SomeTest() { | |
// Arrange | |
var mock = new Mock<IDependency>(); | |
var sut = new ServiceUnderTest(mock.Object); | |
// Act | |
sut.DoIt(); | |
// Assert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fixture = new Fixture(); | |
var model = | |
fixture | |
.Build<MyModel>() | |
.Without(x => x.Id) | |
.CreateAnonymous(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fixture = new Fixture(); | |
var model = fixture.CreateAnonymous<MyModel>(); |
NewerOlder