예제 #1
0
        public void EntityIsNotNullAfterCreate()
        {
            EntityOps entityOps = new EntityOps(DbInit.DBInit().Context);
            Person    person    = entityOps.CreateAndGetPersoFromRelatedCollection(saveChanges: true);

            Assert.IsNotNull(person);
        }
예제 #2
0
        public void EntityIsNullAfterDelete()
        {
            EntityOps entityOps     = new EntityOps(DbInit.DBInit().Context);
            Person    newPerson     = entityOps.CreateAndSavePerson();
            Person    deletedPerson = entityOps.DeleteAndGetPersonFromRelatedCollection(newPerson.Id, saveChanges: true);

            Assert.IsNull(deletedPerson);
        }
예제 #3
0
        public void EntityIsNullAfterCreateNotExpectedBehaviour()
        {
            EntityOps entityOps = new EntityOps(DbInit.DBInit().Context);
            Person    person    = entityOps.CreateAndGetPersoFromRelatedCollection();
            string    error     = @"Person received from collection of team is null. We need it not null.
                SaveChanges or DetectChagnes helps but frequent execution of save make app slow";

            Assert.IsNotNull(person, error);
        }
예제 #4
0
 public void RunAfterAnyTests()
 {
     DbInit.DBInit().DbDispose();
 }
예제 #5
0
 public void RunBeforeAnyTests()
 {
     DbInit.DBInit();
 }