public void ExampleListAndArraysAlternative() { object products = 1; object vendors = 2; object year = 2222; int added1 = 0; int added2 = 0; int added3 = 0; var vendorManager = new TaxvendorManager(products, vendors, year); vendorManager.AddVendor(JobType.JobType1, added1); vendorManager.AddVendor(JobType.JobType2, added2); vendorManager.AddVendor(JobType.JobType3, added3); var expected = @"new VendorAllocation[]() [0] = new VendorAllocation() { Allocation = 100 Price = 20 Share = 20 } [1] = new VendorAllocation() { Allocation = 120 Price = 550 Share = 30 } [2] = new VendorAllocation() { Allocation = 880 Price = 11 Share = 50 }"; TestHelper.Assert().PrintAreAlike(expected, vendorManager.VendorJobSplit); }
public void ExampleListAndArraysAlternative() { object products = 1; object vendors = 2; object year = 2222; int added1 = 0; int added2 = 0; int added3 = 0; var vendorManager = new TaxvendorManager(products, vendors, year); vendorManager.AddVendor(JobType.JobType1, added1); vendorManager.AddVendor(JobType.JobType2, added2); vendorManager.AddVendor(JobType.JobType3, added3); int consumption1 = 333; int consumption2 = 23; int consumption3 = 333; int fee = 10; int fee2 = 11; var expected = @"new Boo[]() [0] = new Boo() { Allocation = 100 Price = 20 Share = 20 } [1] = new Boo() { Allocation = 120 Price = 550 Share = 30 } [2] = new Boo() { Allocation = 880 Price = 11 Share = 50 } "; TestHelper.CreateTestPrinter().Assert.PrintIsSame(expected, vendorManager.VendorJobSplit); }