public StoreServiceResponse Create(StoreDomain store)
        {
            StoreServiceResponse response = new StoreServiceResponse();

            if (!validateIsNotExist(store.Id))
                response.Messages.Add(new Message("Data is already on database"));
            else
            {
                storeEntity = new Store();
                MergeExtension.Merge(storeEntity, store);
                _storeRepository.Add(storeEntity);
                _storeRepository.SaveChanges();
            }

            return response;
        }
        public StoreServiceResponse GetAllStore()
        {
            StoreServiceResponse response = new StoreServiceResponse();
            Collection<Store> stores = _storeRepository.GetAll();

            if (stores.Count == 0)
            {
                response.Messages.Add(new Message("Tidak Ada Store Yang Terdaftar"));
            }
            else
            {
                foreach (var m in stores)
                {
                    StoreDomain storeDomain = new StoreDomain();
                    MergeExtension.Merge(storeDomain, m);
                    response.StoreDomains.Add(storeDomain);
                }
            }
            return response;
        }
        public StoreServiceResponse GetStoreById(Guid id)
        {
            StoreServiceResponse response = new StoreServiceResponse();
            Store store = _storeRepository.GetById(id);
            if (store == null)
            {
                response.Messages.Add(new Message("Data is not in Database"));
            }
            else
            {

                StoreDomain storeDomain = new StoreDomain();
                MergeExtension.Merge(storeDomain, store);
                response.StoreDomain = storeDomain;
            }
            return response;
        }
 public void Initialization()
 {
     //Mock up object
     var repository = Substitute.For<IStoreRepository>();
     s = new StoreDomain();
     service = new StoreDomainService(repository);
     repository.GetById(id1).Returns(store1);
     stores.Add(store1);
     stores.Add(storeInsert);
     repository.GetAll().Returns(stores);
 }