Esempio n. 1
0
        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);
 }
Esempio n. 3
0
 public RollbackTests(ITestOutputHelper output)
 {
     _output = output;
     repo    = new PersonRepo(Context, Transaction);
 }