public void ShouldInsertWhenObjectRepositoryIsValid() { Object entity = FactoryObject.RandomCreate(); _spacePlanningUnitOfWork.ObjectRepository.Add(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.ObjectRepository.GetById(entity.ObjectId); Assert.IsTrue(retrived.Equals(entity)); }
public void ShouldDeleteWhenObjectRepositoryIsValid() { Object entity = FactoryObject.RandomCreate(); _spacePlanningUnitOfWork.ObjectRepository.Add(entity); _spacePlanningUnitOfWork.Save(); _spacePlanningUnitOfWork.ObjectRepository.Delete(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.ObjectRepository.GetById(entity.ObjectId); Assert.IsNull(retrived); }