public void ShouldInsertWhenPlanRepositoryIsValid() { Plan entity = FactoryPlan.RandomCreate(); _spacePlanningUnitOfWork.PlanRepository.Add(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.PlanRepository.GetById(entity.PlanId); Assert.IsTrue(retrived.Equals(entity)); }
public void ShoultDeleteWhenPlanRepositoryIsValid() { var entity = FactoryPlan.RandomCreate(); _spacePlanningUnitOfWork.PlanRepository.Add(entity); _spacePlanningUnitOfWork.Save(); _spacePlanningUnitOfWork.PlanRepository.Delete(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.PlanRepository.GetById(entity.PlanId); Assert.IsNull(retrived); }