public void EntityIsNotNullAfterCreate() { EntityOps entityOps = new EntityOps(DbInit.DBInit().Context); Person person = entityOps.CreateAndGetPersoFromRelatedCollection(saveChanges: true); Assert.IsNotNull(person); }
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); }
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); }
public void RunAfterAnyTests() { DbInit.DBInit().DbDispose(); }
public void RunBeforeAnyTests() { DbInit.DBInit(); }