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