public async void UpdateOrder() { // arrange int CustomerFK = await GenerateCustomer(); int OrderFK = await GenerateOrder(CustomerFK); CustomerTData customerTData = GenerateCustomerTData(); OrderTData orderTData = GenerateOrderTData(0); customerTData.Name = "New Name"; orderTData.CardMessage = "New Card"; // act await _customerCatalog.Update(customerTData); await _orderCatalog.Update(orderTData); // assert Customer customer = await _customerCatalog.Read(CustomerFK); Order order = await _orderCatalog.Read(OrderFK); Assert.AreEqual("New Name", customer.Name); Assert.AreEqual(null, order.CardMessage); Clear(CustomerFK, OrderFK); }
public void UpdateOrder() { CustomerTData customerTData = GenerateCustomerTData(); OrderTData orderTData = GenerateOrderTData(_customerFK); customerTData.Key = _customerFK; customerTData.Name = "New Name"; orderTData.Key = _orderFK; orderTData.CardMessage = "New Card"; _customerCatalog.Update(customerTData).Wait(); _orderCatalog.Update(orderTData).Wait(); Order _order; _orderCatalog.Data.TryGetValue(_orderFK, out _order); Customer _customer; _customerCatalog.Data.TryGetValue(_customerFK, out _customer); Assert.AreEqual("New Name", _customer.Name); Assert.AreEqual("New Card", _order.CardMessage); }