public void get_records_by_partition_key_paged_using_maximum_page_size()
        {
            var tableStore = new TableStore <TestTableEntity>("recordsbypartmaxpage", ConnectionString, _tableStorageOptions);

            for (int i = 0; i < 11; i++)
            {
                var records = new List <TestTableEntity>();
                for (int j = 0; j < 100; j++)
                {
                    records.Add(new TestTableEntity($"{i}_{j}", "x"));
                }
                tableStore.Insert(records);
            }

            var results         = tableStore.GetByPartitionKeyPaged("x", pageSize: 1000);
            var nextPageResults =
                tableStore.GetByPartitionKeyPaged("x", pageSize: 1000,
                                                  continuationTokenJson: results.ContinuationToken);

            results.Items.Count.Should().Be(1000);
            nextPageResults.Items.Count.Should().Be(100);
            nextPageResults.IsFinalPage.Should().BeTrue();

            tableStore.DeleteTable();
        }
Пример #2
0
 /// <summary>
 /// Deletes the table storage table.
 /// </summary>
 public void DeleteTable()
 {
     _tableStore.DeleteTable();
 }