public void Purchase_Test(RealTimeInventory inventory, uint toPurchase) { IInventoryServiceCompletedMessage response; using (var testHelper = CreateInventoryServiceServer(inventory)) { response = testHelper.PurchaseAsync(inventory, (int)toPurchase).WaitAndGetOperationResult(); } InventoryServiceSpecificationHelper.AssertPurchase(inventory, toPurchase, response); }