public void AddHidden(FactoryElement fe) { if (!hidden.Contains(fe)) { hidden.Add(fe); } }
public void AddObject(FactoryElement o) { Hidden.Remove(o); if (!OnScene.Contains(o)) { OnScene.Add(o); } }
public void RemoveObject(FactoryElement o) { //if (onScecne.Contains(o)) { onScecne.Remove(o); AddHidden(o); o.gameObject.SetActive(false); } }
public void ShouldInsertWhenElementRepositoryIsValid() { var entity = FactoryElement.RandomCreate(); _spacePlanningUnitOfWork.ElementRepository.Add(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.ElementRepository.GetById(entity.ElementId); Assert.IsTrue(retrived.Equals(entity)); }
public void ShoultDeleteWhenElementRepositoryIsValid() { var entity = FactoryElement.RandomCreate(); _spacePlanningUnitOfWork.ElementRepository.Add(entity); _spacePlanningUnitOfWork.Save(); _spacePlanningUnitOfWork.ElementRepository.Delete(entity); _spacePlanningUnitOfWork.Save(); var retrived = _spacePlanningUnitOfWork.ElementRepository.GetById(entity.ElementId); Assert.IsNull(retrived); }