public void ShouldInsertWhenPhysicalElementRepositoryIsValid() { var entity = FactoryPhysicalElement.RandomCreate(); _spacePlanningUnitOfWork.PhysicalElementRepository.Add(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.PhysicalElementRepository.GetById(entity.PhysicalElementId); Assert.IsTrue(retrived.Equals(entity)); }
public void ShoultDeleteWhenPhysicalElementRepositoryIsValid() { var entity = FactoryPhysicalElement.RandomCreate(); _spacePlanningUnitOfWork.PhysicalElementRepository.Add(entity); _spacePlanningUnitOfWork.Save(); _spacePlanningUnitOfWork.PhysicalElementRepository.Delete(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.PhysicalElementRepository.GetById(entity.PhysicalElementId); Assert.IsNull(retrived); }