private void SetupComboItems() { string guid = Guid.NewGuid().ToString().Remove(0, 20); ComboItemProxy comboItem = new ComboItemProxy(); this.CPU = new ComboItemDto(); this.CPU.Code = "DESKTOP " + guid; this.CPU.Description = "Desktop PC"; this.CPU.IsInventoried = true; this.CPU.AssetAccountUid = this.AssetInventory.Uid; this.CPU.IsSold = true; this.CPU.SaleCoSAccountUid = this.CoSHardware.Uid; this.CPU.SaleIncomeAccountUid = this.IncomeHardwareSales.Uid; this.CPU.RrpInclTax = 575.00M; this.CPU.Items = new System.Collections.Generic.List<ComboItemLineItemDto>(); ComboItemLineItemDto lineItem = new ComboItemLineItemDto(); lineItem.Uid = this.HardDisk.Uid; lineItem.Code = this.HardDisk.Code; lineItem.Quantity = 1; this.CPU.Items.Add(lineItem); lineItem = new ComboItemLineItemDto(); lineItem.Uid = this.Cat5Cable.Uid; lineItem.Code = this.Cat5Cable.Code; lineItem.Quantity = 1; this.CPU.Items.Add(lineItem); comboItem.Insert(this.CPU); }
protected ComboItemDto GetComboItem02() { ComboItemDto comboItemDto = new ComboItemDto(); comboItemDto.Code = "C - " + System.Guid.NewGuid().ToString().Substring(0, 10); comboItemDto.Description = "Insert Combo Item Test"; comboItemDto.Items = new List<ComboItemLineItemDto>(); ComboItemLineItemDto lineItem = new ComboItemLineItemDto(); lineItem.Uid = this.Shipping1.Uid; lineItem.Code = this.Shipping1.Code; lineItem.Quantity = 1; comboItemDto.Items.Add(lineItem); lineItem = new ComboItemLineItemDto(); lineItem.Uid = this.AsusLaptop.Uid; lineItem.Code = this.AsusLaptop.Code; lineItem.Quantity = 1; comboItemDto.Items.Add(lineItem); comboItemDto.IsInventoried = true; comboItemDto.AssetAccountUid = this.AssetInventory.Uid; comboItemDto.IsSold = true; comboItemDto.SaleIncomeAccountUid = this.IncomeHardwareSales.Uid; comboItemDto.SaleCoSAccountUid = this.CoSHardware.Uid; comboItemDto.SaleTaxCode = "G1"; comboItemDto.SellingPrice = 350.00M; comboItemDto.RrpInclTax = 350.00M; return comboItemDto; }
private void AssertEqual(ComboItemDto expected, ComboItemDto actual) { InventoryItemTests.AssertEqual(expected, actual); this.AssertEqual(expected.Items, actual.Items); }
protected ComboItemDto GetComboItem01() { ComboItemDto comboItemDto = new ComboItemDto(); comboItemDto.Code = "C - " + System.Guid.NewGuid().ToString().Substring(0, 10); comboItemDto.Description = "Insert Combo Item Test"; comboItemDto.Items = new List<ComboItemLineItemDto>(); ComboItemLineItemDto lineItem = new ComboItemLineItemDto(); lineItem.Uid = this.AsusLaptop.Uid; lineItem.Code = this.AsusLaptop.Code; lineItem.Quantity = 1; comboItemDto.Items.Add(lineItem); lineItem = new ComboItemLineItemDto(); lineItem.Uid = this.Cat5Cable.Uid; lineItem.Code = this.Cat5Cable.Code; lineItem.Quantity = 1; comboItemDto.Items.Add(lineItem); comboItemDto.IsInventoried = true; comboItemDto.AssetAccountUid = this.AssetInventory.Uid; comboItemDto.IsSold = true; comboItemDto.SaleIncomeAccountUid = this.IncomeHardwareSales.Uid; comboItemDto.SaleCoSAccountUid = this.CoSHardware.Uid; comboItemDto.SaleTaxCode = "G1"; comboItemDto.SellingPrice = 350.00M; comboItemDto.RrpInclTax = 350.00M; comboItemDto.IsBought = true; comboItemDto.PurchaseTaxCode = "G10"; comboItemDto.PrimarySupplierContactUid = this.MrSmith.Uid; comboItemDto.BuyingPrice = 175.00M; comboItemDto.PrimarySupplierItemCode = "ITOP090"; comboItemDto.DefaultReOrderQuantity = 10; comboItemDto.IsVoucher = true; comboItemDto.ValidFrom = DateTime.Parse("28-May-2010"); comboItemDto.ValidTo = DateTime.Parse("28-Dec-2010"); comboItemDto.IsVirtual = true; comboItemDto.VType = "Virtual Voucher"; comboItemDto.Notes = "Combo item notes."; comboItemDto.IsVisible = true; return comboItemDto; }