public void GetByDeviceTypeAndModelFail() { IDeviceManufacturerInfoRepository iDeviceManufacturerInfoRepository = new DeviceManufacturerInfoRepository(this.connectionString); DeviceManufacturerInfo deviceManufacturerInfo = iDeviceManufacturerInfoRepository .Find(PlatformType.Blackberry, Guid.NewGuid().ToString().Substring(0, 10)); Assert.IsNull(deviceManufacturerInfo); }
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); }
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); }