Created
November 19, 2015 14:10
-
-
Save mat-mcloughlin/a3c243c9e527d1b9670e to your computer and use it in GitHub Desktop.
This file contains 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
[Fact] | |
public void SomeOtherReallyBadTest() | |
{ | |
var context = new ConfigurableContext<FooContext>(ctx => | |
{ | |
ctx.Setup(x => x.Users, new List<User>()); | |
}); | |
var subject = new Foo(configurableContext); //Note the implicit conversion | |
var usr = subject.SaveUser(new User { Name = "Joe" }); | |
context.WasSaved<User>(u => u.Name == "Joe"); | |
} | |
[Fact] | |
public void SomeReallyBadTest() | |
{ | |
var context = new ConfigurableContext<FooContext>(ctx => | |
{ | |
ctx.Setup(x => x.Users, new List<User> | |
{ | |
new User | |
{ | |
UserId = 1014, | |
Username = "Joe", | |
Password = "SecurePassword1ThatIsHashed!" | |
} | |
}); | |
}); | |
var subject = new Foo(configurableContext); //Note the implicit conversion | |
var usr = subject.FindUser("Joe"); | |
usr.Should().NotBeNull(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment