예제 #1
0
 public void AddHidden(FactoryElement fe)
 {
     if (!hidden.Contains(fe))
     {
         hidden.Add(fe);
     }
 }
예제 #2
0
 public void AddObject(FactoryElement o)
 {
     Hidden.Remove(o);
     if (!OnScene.Contains(o))
     {
         OnScene.Add(o);
     }
 }
예제 #3
0
 public void RemoveObject(FactoryElement o)
 {
     //if (onScecne.Contains(o))
     {
         onScecne.Remove(o);
         AddHidden(o);
         o.gameObject.SetActive(false);
     }
 }
예제 #4
0
        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));
        }
예제 #5
0
        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);
        }