public void ThenTheUpdateCustomerEventDetailsAreStoredInVSSDB() { string customerUID = customerServiceSupport.UpdateCustomerModel.CustomerUID.ToString().Replace("-", ""); string customerName = String.IsNullOrEmpty(customerServiceSupport.UpdateCustomerModel.CustomerName) ? customerServiceSupport.CreateCustomerModel.CustomerName : customerServiceSupport.UpdateCustomerModel.CustomerName; string customerType = customerServiceSupport.CreateCustomerModel.CustomerType.ToString(); string primaryContactEmail = customerServiceSupport.UpdateCustomerModel.PrimaryContactEmail == null ? customerServiceSupport.CreateCustomerModel.PrimaryContactEmail : customerServiceSupport.UpdateCustomerModel.PrimaryContactEmail; string firstName = customerServiceSupport.UpdateCustomerModel.FirstName == null ? customerServiceSupport.CreateCustomerModel.FirstName : customerServiceSupport.UpdateCustomerModel.FirstName; string lastName = customerServiceSupport.UpdateCustomerModel.LastName == null ? customerServiceSupport.CreateCustomerModel.LastName : customerServiceSupport.UpdateCustomerModel.LastName; CommonUtil.WaitToProcess("2"); //Wait for the data to get persisted in DB List <string> columnList = new List <string>() { "CustomerUID", "CustomerName", "CustomerType", "PrimaryContactEmail", "FirstName", "LastName" }; List <string> updateCustomerDetails = new List <string>(); updateCustomerDetails.Add(customerUID.ToUpper()); updateCustomerDetails.Add(customerName); updateCustomerDetails.Add(GetCustomerTypeId(customerType)); updateCustomerDetails.Add(primaryContactEmail); updateCustomerDetails.Add(firstName); updateCustomerDetails.Add(lastName); string validateQuery = CustomerServiceMySqlQueries.CustomerDetailsByCustomerUID + customerUID + "')"; string validateDateQuery = CustomerServiceMySqlQueries.CustomerUpdateUTCByCustomerUID + customerUID + "')"; MySqlUtil.ValidateMySQLQuery(MySqlConnectionString, validateQuery, updateCustomerDetails); MySqlUtil.ValidateMySQLDateValueQuery(MySqlConnectionString, validateDateQuery, DateTime.UtcNow.AddMinutes(-2), "LESS_THAN_DB"); }
public void ThenTheUpdateCustomerEventDetailsAreUpdatedInVSSDB() { customerUID = customerServiceSupport.UpdateCustomerModel.CustomerUID.ToString(); customerName = customerServiceSupport.UpdateCustomerModel.CustomerName; string validateQuery = CustomerListSqlQueries.CustomerNameUpdateByCustomerUID + customerUID + "'"; string validateDateQuery = CustomerListSqlQueries.CustomerUpdateUTCByCustomerUID + customerUID + "'"; MySqlUtil.ValidateMySQLQuery(MySqlConnectionString, validateQuery, customerName.ToString()); MySqlUtil.ValidateMySQLDateValueQuery(MySqlConnectionString, validateDateQuery, actionUTC, "LESS_THAN_DB"); }
public void ThenTheCreateCustomerEventDetailsAreStoredInVSSDB() { customerUID = customerServiceSupport.CreateCustomerModel.CustomerUID.ToString(); customerName = customerServiceSupport.CreateCustomerModel.CustomerName; customerType = customerServiceSupport.CreateCustomerModel.CustomerType.ToString(); CommonUtil.WaitToProcess(CustomerListConfig.KafkaTimeoutThreshold); List <string> columnList = new List <string>() { "CustomerUID", "CustomerName", "CustomerType" }; List <string> createCustomerDetails = new List <string>(); createCustomerDetails.Add(customerUID); createCustomerDetails.Add(customerName); createCustomerDetails.Add(GetCustomerTypeId(customerType)); string validateQuery = CustomerListSqlQueries.CustomerDetailsByCustomerUID + customerUID + "'"; string validateDateQuery = CustomerListSqlQueries.CustomerUpdateUTCByCustomerUID + customerUID + "'"; MySqlUtil.ValidateMySQLQuery(MySqlConnectionString, validateQuery, createCustomerDetails); MySqlUtil.ValidateMySQLDateValueQuery(MySqlConnectionString, validateDateQuery, DateTime.UtcNow.AddMinutes(-2), "LESS_THAN_DB"); }