public void test_delete() { var redundantTable = new RedundantTableStorage<Customer>("UseDevelopmentStorage=true", "Customer", true, serviceBus, "RedundancyQueue", "UseDevelopmentStorage=true"); var customer = new Customer(); redundantTable.Insert(customer); redundantTable.Delete(customer.PartitionKey, customer.RowKey); IAzureTableUtility customerArchiver = MefBase.Container.GetExportedValue<IAzureTableUtility>(); customerArchiver.ConnectionString = "UseDevelopmentStorage=True"; customerArchiver.TableName = "TransactionLog"; Assert.IsTrue(customerArchiver.FindByPartitionKey<TableEntity>("Customer").Count() == 2); }
public void test_delete() { var redundantTable = new RedundantTableStorage <Customer>("UseDevelopmentStorage=true", "Customer", true, serviceBus, "RedundancyQueue", "UseDevelopmentStorage=true"); var customer = new Customer(); redundantTable.Insert(customer); redundantTable.Delete(customer.PartitionKey, customer.RowKey); IAzureTableUtility customerArchiver = MefBase.Container.GetExportedValue <IAzureTableUtility>(); customerArchiver.ConnectionString = "UseDevelopmentStorage=True"; customerArchiver.TableName = "TransactionLog"; Assert.IsTrue(customerArchiver.FindByPartitionKey <TableEntity>("Customer").Count() == 2); }
public void test_insert() { var redundantTable = new RedundantTableStorage<Customer>("UseDevelopmentStorage=true", "Customer", true, serviceBus, "RedundancyQueue", "UseDevelopmentStorage=true"); for (int i = 0; i < 10; i++) { redundantTable.Upsert(new Customer { Email = i.ToString(), FirstName = i.ToString(), LastName = i.ToString() }); } Assert.IsTrue(redundantTable.FindByPartitionKey($"{DateTime.Now:yyyy-MM-DD}").Count() == 10); IAzureTableUtility customerArchiver = MefBase.Container.GetExportedValue<IAzureTableUtility>(); customerArchiver.ConnectionString = "UseDevelopmentStorage=True"; customerArchiver.TableName = "TransactionLog"; Assert.IsTrue(customerArchiver.FindByPartitionKey<TableEntity>("Customer").Count() == 10); }
public void test_insert() { var redundantTable = new RedundantTableStorage <Customer>("UseDevelopmentStorage=true", "Customer", true, serviceBus, "RedundancyQueue", "UseDevelopmentStorage=true"); for (int i = 0; i < 10; i++) { redundantTable.Upsert(new Customer { Email = i.ToString(), FirstName = i.ToString(), LastName = i.ToString() }); } Assert.IsTrue(redundantTable.FindByPartitionKey($"{DateTime.Now:yyyy-MM-DD}").Count() == 10); IAzureTableUtility customerArchiver = MefBase.Container.GetExportedValue <IAzureTableUtility>(); customerArchiver.ConnectionString = "UseDevelopmentStorage=True"; customerArchiver.TableName = "TransactionLog"; Assert.IsTrue(customerArchiver.FindByPartitionKey <TableEntity>("Customer").Count() == 10); }