public void CreateNewDeviceTypeWithUpsertTest()
        {
            var newDeviceType = new DeviceType {
                DeviceTypeName = "New Upsert Test Device Type", DeviceCategoryId = TestDeviceCategory.DeviceCategoryId
            };

            DeviceTypeService.Upsert(newDeviceType, TestUserPrincipal);
            var foundDeviceTypes = DeviceTypeService.Search("New Upsert Test Device Type").ToList();

            Assert.AreEqual(1, foundDeviceTypes.Count);
            Assert.AreEqual(foundDeviceTypes.First().DeviceTypeName, newDeviceType.DeviceTypeName);

            DeviceTypeService.DeleteByGuid(foundDeviceTypes.First().DeviceTypeId);
        }
Esempio n. 2
0
 public void DeleteTestDeviceType(DeviceType deviceType)
 {
     DeviceTypeService.DeleteByGuid(deviceType.DeviceTypeId);
 }