Sha256: 2a1acdbab7b0357b03e6fc33998ee09ea9a9291e8f9e92fc8121dd347179da3c
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
require "test_helper" require "azure/atom" require "azure/tables" require "azure/tables/entities_collection" describe Azure::Tables::EntitiesCollection do let :service do MiniTest::Mock.new end before do @table = Azure::Tables::Table.new("table_name") entries = Azure::Atom::Feed.load_feed(Fixtures[:query_entities_response]).entries @collection = Azure::Tables::EntitiesCollection.from_entries(@table, entries, {}, service) end it "return an instance from entries feed" do @collection.must_be :kind_of?, Azure::Tables::EntitiesCollection @collection.size.must_equal 2 end it "should indicate if the result is a paginated result" do @collection.paginated?.must_equal false @collection.continuation_token("part1", "row2") @collection.paginated?.must_equal true end it "should be able to set continuation tokens" do @collection.continuation_token("part1", "row2") service.expect(:query_entities, nil, [@table, { "NextPartitionKey" => "part1", "NextRowKey" => "row2" }]) @collection.next end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
azure-0.1.1 | test/unit/tables/entities_collection_test.rb |
azure-0.1.0 | test/unit/tables/entities_collection_test.rb |