public async void TestGenericOperations_IndependentEntityRepository()
        {
            var repo = new TestIndependentEntityRepo(_tableName, _serviceUrl);

            var list = await repo.GSI1QueryAllAsync();

            Assert.Equal(0, list.Count);

            var te1 = new TestEntity {
                Id = "TE1", Name = "TestEntity TE1"
            };
            await repo.AddItemAsync("TE1", te1);

            list = await repo.GSI1QueryAllAsync();

            Assert.Equal(1, list.Count);

            var te2 = new TestEntity {
                Id = "TE2", Name = "TestEntity TE2"
            };
            await repo.AddItemAsync("TE2", te2);

            list = await repo.GSI1QueryAllAsync();

            Assert.Equal(2, list.Count);

            var found1 = await repo.GetItemAsync(te1.Id);

            Assert.NotNull(found1);
            Assert.Equal("TE1", found1.Id);
            Assert.Equal("TestEntity TE1", found1.Name);

            var found2 = await repo.GetItemAsync(te2.Id);

            Assert.NotNull(found2);
            Assert.Equal("TE2", found2.Id);
            Assert.Equal("TestEntity TE2", found2.Name);

            await repo.DeleteItemAsync(te1.Id);

            list = await repo.GSI1QueryAllAsync();

            Assert.Equal(1, list.Count);

            var deleted1 = await repo.GetItemAsync(te1.Id);

            Assert.Null(deleted1);

            await repo.DeleteItemAsync(te2.Id);

            list = await repo.GSI1QueryAllAsync();

            Assert.Equal(0, list.Count);

            var deleted2 = await repo.GetItemAsync(te1.Id);

            Assert.Null(deleted2);
        }
        public async void TestBatchOperations_IndependentEntityRepository()
        {
            var repo          = new TestIndependentEntityRepo(_tableName, _serviceUrl);
            var itemsToCreate = new List <KeyValuePair <string, TestEntity> >();

            for (int i = 50; i < 60; i++)
            {
                var te = new TestEntity {
                    Id = "TE" + i, Name = "TestEntity TE" + i
                };
                itemsToCreate.Add(new KeyValuePair <string, TestEntity>(te.Id, te));
            }
            await repo.BatchAddItemsAsync(itemsToCreate);

            var list = await repo.GSI1QueryAllAsync();

            Assert.Equal(10, list.Count);

            for (int i = 0; i < 10; i++)
            {
                var item = list[i];
                var id   = i + 50;
                Assert.NotNull(item);
                Assert.Equal("TE" + id, item.Id);
                Assert.Equal("TestEntity TE" + id, item.Name);
            }

            var itemsToDelete = new List <string>();

            for (int i = 50; i < 60; i++)
            {
                var te = new TestEntity {
                    Id = "TE" + i
                };
                itemsToDelete.Add(te.Id);
            }
            await repo.BatchDeleteItemsAsync(itemsToDelete);

            var emptyList = await repo.GSI1QueryAllAsync();

            Assert.Empty(emptyList);
        }