Beispiel #1
0
        public void CreateNewDeviceSettingWithUpsertTest()
        {
            var newDeviceSetting = new DeviceSetting
            {
                DeviceSettingName  = "New Upsert Test Device Setting",
                DeviceSettingValue = "New Device Setting Upsert Value",
                OwnedDeviceId      = TestOwnedDevice.OwnedDeviceId
            };

            DeviceSettingService.Upsert(newDeviceSetting, TestUserPrincipal);
            var foundDeviceSettings = DeviceSettingService.Search("New Upsert Test Device Setting").ToList();

            Assert.AreEqual(1, foundDeviceSettings.Count);
            Assert.AreEqual(foundDeviceSettings.First().DeviceSettingName, newDeviceSetting.DeviceSettingName);
            Assert.AreEqual(foundDeviceSettings.First().DeviceSettingValue, newDeviceSetting.DeviceSettingValue);

            DeviceSettingService.DeleteByGuid(foundDeviceSettings.First().DeviceSettingId);
        }
 public void DeleteTestDeviceSetting(DeviceSetting deviceSetting)
 {
     DeviceSettingService.DeleteByGuid(deviceSetting.DeviceSettingId);
 }