Beispiel #1
0
        public void SaveAndUpdate()
        {
            AppActs.API.Repository.Interface.IApplicationDevicesRepository iApplicationDevicesRepository =
                new AppActs.API.Repository.ApplicationDevicesRepository(this.connectionString);

            iApplicationDevicesRepository.Save(this.Application.Id, this.Device.Id, "1.1.1", true, DateTime.Now);

            iApplicationDevicesRepository.UpdateCurrentActive(this.Application.Id, this.Device.Id, false);

            iApplicationDevicesRepository.Save(this.Application.Id, this.Device.Id, "1.1.2", true, DateTime.Now);
        }
        public void SaveAndUpdate()
        {
            AppActs.API.Repository.Interface.IApplicationDevicesRepository iApplicationDevicesRepository =
                new AppActs.API.Repository.ApplicationDevicesRepository(this.connectionString);

            iApplicationDevicesRepository.Save(this.Application.Id, this.Device.Id, "1.1.1", true, DateTime.Now);

            iApplicationDevicesRepository.UpdateCurrentActive(this.Application.Id, this.Device.Id, false);

            iApplicationDevicesRepository.Save(this.Application.Id, this.Device.Id, "1.1.2", true, DateTime.Now);
        }
        public void Save()
        {
            AppActs.API.Repository.Interface.IApplicationDevicesRepository iApplicationDevicesRepository =
                new AppActs.API.Repository.ApplicationDevicesRepository(this.client, this.database);

            iApplicationDevicesRepository.Save(new ApplicationDevice(this.Application.Id, this.Device.Id, "1.1.1", true, DateTime.Now));
        }
        public void Save()
        {
            AppActs.API.Repository.Interface.IApplicationDevicesRepository iApplicationDevicesRepository =
                new AppActs.API.Repository.ApplicationDevicesRepository(this.client, this.database);

            iApplicationDevicesRepository.Save(new ApplicationDevice(this.Application.Id, this.Device.Id, "1.1.1", true, DateTime.Now));
        }
        public void Update()
        {
            AppActs.API.Repository.Interface.IApplicationDevicesRepository iApplicationDevicesRepository =
                new AppActs.API.Repository.ApplicationDevicesRepository(this.client, this.database);

            DomainModel.Device device = this.GenerateNewDevice();

            ApplicationDevice applicationDevice = new ApplicationDevice(this.Application.Id, this.Device.Id, "1.2.3", true, DateTime.Now);

            iApplicationDevicesRepository.Save(applicationDevice);

            applicationDevice.Active = false;
            iApplicationDevicesRepository.Update(applicationDevice);

            Assert.IsNull(iApplicationDevicesRepository.FindCurrentActiveByDevice(device.Id));
        }
        public void Update()
        {
            AppActs.API.Repository.Interface.IApplicationDevicesRepository iApplicationDevicesRepository =
                new AppActs.API.Repository.ApplicationDevicesRepository(this.client, this.database);

            DomainModel.Device device = this.GenerateNewDevice();

            ApplicationDevice applicationDevice = new ApplicationDevice(this.Application.Id, this.Device.Id, "1.2.3", true, DateTime.Now);

            iApplicationDevicesRepository.Save(applicationDevice);

            applicationDevice.Active = false;
            iApplicationDevicesRepository.Update(applicationDevice);

            Assert.IsNull(iApplicationDevicesRepository.FindCurrentActiveByDevice(device.Id));
        }