Exemplo n.º 1
0
        public void GetByDeviceTypeAndModelFail()
        {
            IDeviceManufacturerInfoRepository iDeviceManufacturerInfoRepository =
                new DeviceManufacturerInfoRepository(this.connectionString);

            DeviceManufacturerInfo deviceManufacturerInfo = iDeviceManufacturerInfoRepository
                                                            .Find(PlatformType.Blackberry,
                                                                  Guid.NewGuid().ToString().Substring(0, 10));

            Assert.IsNull(deviceManufacturerInfo);
        }
Exemplo n.º 2
0
        public void Save()
        {
            IDeviceManufacturerInfoRepository iDeviceManufacturerInfoRepository =
                new DeviceManufacturerInfoRepository(this.connectionString);

            DeviceManufacturerInfo deviceManufacturerInfo =
                new DeviceManufacturerInfo(PlatformType.Blackberry,
                                           Guid.NewGuid().ToString().Substring(0, 10), 2, 800, 800);

            iDeviceManufacturerInfoRepository.Save(deviceManufacturerInfo);
        }
Exemplo n.º 3
0
        public void GetByDeviceTypeAndModel()
        {
            IDeviceManufacturerInfoRepository iDeviceManufacturerInfoRepository =
                new DeviceManufacturerInfoRepository(this.connectionString);

            DeviceManufacturerInfo deviceManufacturerInfo =
                new DeviceManufacturerInfo(PlatformType.Blackberry,
                                           Guid.NewGuid().ToString().Substring(0, 10), 2, 800, 800);

            iDeviceManufacturerInfoRepository.Save(deviceManufacturerInfo);

            DeviceManufacturerInfo deviceManufacturerInfoRetrieved = iDeviceManufacturerInfoRepository.Find(PlatformType.Blackberry, deviceManufacturerInfo.Model);

            Assert.IsNotNull(deviceManufacturerInfoRetrieved);
            Assert.IsTrue(deviceManufacturerInfo.DeviceType == deviceManufacturerInfoRetrieved.DeviceType);
            Assert.IsTrue(deviceManufacturerInfo.Model == deviceManufacturerInfoRetrieved.Model);
            Assert.IsTrue(deviceManufacturerInfo.ResolutionHeight == deviceManufacturerInfoRetrieved.ResolutionHeight);
            Assert.IsTrue(deviceManufacturerInfo.ResolutionWidth == deviceManufacturerInfoRetrieved.ResolutionWidth);
            Assert.IsTrue(deviceManufacturerInfo.ManufacturerId == deviceManufacturerInfoRetrieved.ManufacturerId);
        }