public void InsertAndThrowException() { repo.Create(new Person { LastName = "Barker", FirstName = "Bob" }); repo.Create(new Person { LastName = "Hall", FirstName = "Monty" }); Assert.Throws <Exception>(() => repo.ThrowException()); repo = new PersonRepo(Context, null); var expected = 4; var actual = repo.GetAll().Count; Assert.Equal(expected, actual); }
public PersonRepoTests(ITestOutputHelper output) { this.output = output; repo = new PersonRepo(Context, Transaction); }
public RollbackTests(ITestOutputHelper output) { _output = output; repo = new PersonRepo(Context, Transaction); }