Beispiel #1
0
        public DataRepository(IDataFiller api)
        {
            this.Storage = new DataContext();
            this.Api     = api;

            this.Storage.Events.CollectionChanged += EventChanged;
        }
Beispiel #2
0
 public DataFillerTest(DataFixture fixture)
 {
     this.DataFixture = fixture;
     this._timeNow    = DateTimeOffset.Now.ToUnixTimeMilliseconds();
     this.DataFiller  = new OnDemandDataFiller(DataFixture.DataController, DataFixture.ContractController);
     DataFixture.DataController.Reset();
 }
 public DataRepository(DataContext dataContext, IDataFiller filler)
 {
     this.dataContext = dataContext;
     this.dataContext.events.CollectionChanged += CollectionEventsChanged;
     this.filler = filler;
     filler.Fill(dataContext);
 }
Beispiel #4
0
        void FillRepo(IDataFiller filler)
        {
            var Repo = new DataRepository();

            Repo.SetFiller(filler);
            Repo.Fill();
        }
Beispiel #5
0
        public DataRepository(IDataFiller dataFiller)
        {
            _dataFiller = dataFiller;
            _dataFiller.Fill(_dataContext);

            _dataContext.Invoices.CollectionChanged += InvoicesCollectionChanged;
        }
 public DataRepository(DataContext dc, IDataFiller idf)
 {
     filler      = idf;
     dataContext = dc;
     dataContext.eventObservableCollection.CollectionChanged += (sender, e) =>
     {
         OnEventChanged?.Invoke(e);
     };
 }
Beispiel #7
0
 public DataRepository(IDataFiller dataFiller)
 {
     DataCtx = new DataContext();
     if (dataFiller == null)
     {
         throw new ArgumentNullException("IDataFiller", "Given argument is null.");
     }
     DataFiller = dataFiller;
 }
        public void SetFillerTest()
        {
            //Mock data filler
            var            MockDataFiller = new Mock <IDataFiller>();
            DataRepository dataRepository = new DataRepository();

            //SetFiller
            dataRepository.SetFiller(MockDataFiller.Object);

            //Reflect filler
            var         filler            = typeof(DataRepository).GetField("Filler", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
            IDataFiller dataCactualFiller = (IDataFiller)filler.GetValue(dataRepository);

            //check filler
            Assert.AreSame(dataCactualFiller, MockDataFiller.Object);
        }
Beispiel #9
0
 public SystemController(IDataFiller filler)
 {
     this.repository          = new Repository(filler);
     this.webSocketController = new WebSocketController(repository);
 }
Beispiel #10
0
 public MerchandiseRepository(DataContext dataContext, IDataFiller dataFiller)
 {
     _dataContext = dataContext;
     dataFiller.Fill(_dataContext);
 }
Beispiel #11
0
 public DataRepository(IDataFiller dataFiller)
 {
     _dataContext = new DataContext();
     dataFiller.Fill(_dataContext);
 }
Beispiel #12
0
 public DataRepositoryTests()
 {
     constantFiller = new ConstantFiller();
     dataRepository = new DataRepository(constantFiller);
 }
 public Repository(IDataFiller filler)
 {
     data = filler.Fill();
 }
Beispiel #14
0
 public void SetFiller(IDataFiller dataFiller) => Filler = dataFiller;
Beispiel #15
0
 public DataRepository(IDataFiller filler)
 {
     filler.fill(dane);
     dane.zdarzenia.CollectionChanged += ZdarzenieChanged;
 }
Beispiel #16
0
 public void ChangeFiller(IDataFiller df)
 {
     repository.Filler = df;
 }
 public void TestInitialize()
 {
     this.DataFiller = new JsonDataFillerImpl();
 }
Beispiel #18
0
 protected BaseList(IDataFiller <T> dataFiller)
 {
     _list       = new List <T>();
     _dataFiller = dataFiller;
 }
Beispiel #19
0
 public DataRepository(IDataFiller dataFiller)
 {
     this.DataFiller  = dataFiller;
     this.dataContext = new DataContext();
 }
Beispiel #20
0
 protected CrudRepository(IDataFiller dataFiller)
 {
     dataFiller?.Fill(this);
 }
 public DataRepository(IDataFiller dataFiller, DataContext dataContext)
 {
     this.dataContext = dataContext;
     this.dataFiller  = dataFiller;
     dataFiller.Fill(dataContext);
 }
Beispiel #22
0
 public DataRepository(IDataFiller dataFiller)
 {
     DataContext = new DataContext();
     dataFiller.Fill(this);
 }
Beispiel #23
0
 public DataRepository(IDataFiller dataFiller, DataContext dataContext)
 {
     DataContext = dataContext;
     dataFiller.Fill(dataContext);
 }
Beispiel #24
0
 public DataServiceTests()
 {
     constantFiller = new ConstantFiller();
     dataRepository = new DataRepository(constantFiller);
     dataService    = new DataService(dataRepository);
 }
Beispiel #25
0
 public DataRepositoryForTest(IDataFiller dataFiller)
 {
     this._dataFiller = dataFiller;
     this._dataFiller.Fill(this._dataContext);
 }
Beispiel #26
0
 public DataRepository(IDataFiller dataFiller)
 {
     this.dataFiller = dataFiller;
     this.dataFiller.Fill(dataContext);
 }
 public OrderRepository(DataContext dataContext, IDataFiller dataFiller)
 {
     _dataContext = dataContext;
     dataFiller.Fill(_dataContext);
 }
Beispiel #28
0
 public OrderSystem(IDataFiller filler)
 {
     this.repository = new Repository(filler);
 }
Beispiel #29
0
 public DataRepository(IDataFiller dataFiller) : base(dataFiller)
 {
 }
Beispiel #30
0
 public DataRepository(IDataFiller dataFiller)
 {
     this.DataFiller = dataFiller;
     this.DataFiller.Fill(this.DataContext);
     this.modelKey = 0;
 }