public void UpdateDeleted()
        {
            CrudProxy proxy = new InventoryItemProxy();
            InventoryItemDto dto1 = this.GetInventoryItem();
            proxy.Insert(dto1);

            proxy.DeleteByUid(dto1.Uid);

            dto1.Description = "Try updating deleted item";

            try
            {
                proxy.Update(dto1);
                throw new Exception("Expected exception not thrown.");
            }
            catch (RestException rex)
            {
                if (!rex.Message.Contains("Unable to find inventory item uid"))
                {
                    throw new Exception("Possibly incorrect error thrown.");
                }
            }
        }
        public void UpdateAsInventoryItem()
        {
            ComboItemProxy proxy = new ComboItemProxy();
            ComboItemDto comboItem = this.GetComboItem01();
            proxy.Insert(comboItem);

            ComboItemDto fromDB = (ComboItemDto)proxy.GetByUid(comboItem.Uid);
            fromDB.Description = fromDB.Description + " - Update as Inventory Item";
            fromDB.Items.Clear();

            InventoryItemProxy itemProxy = new InventoryItemProxy();
            itemProxy.Update(fromDB);
        }
        public void Update()
        {
            CrudProxy proxy = new InventoryItemProxy();
            InventoryItemDto dto1 = this.GetInventoryItem();
            proxy.Insert(dto1);

            string lastUpdatedUid = dto1.LastUpdatedUid;

            dto1.Description = this.TestUid + "For Test Update - Updated";
            dto1.Notes = "Updated ....";
            dto1.AssetAccountUid = this.AssetInventory2.Uid;
            dto1.SaleTaxCode = TaxCode.SaleExports;

            proxy.Update(dto1);

            Assert.IsTrue(dto1.LastUpdatedUid != lastUpdatedUid);

            InventoryItemDto dto2 = (InventoryItemDto) proxy.GetByUid(dto1.Uid);

            AssertEqual(dto1, dto2);
        }