/**
  * @covers MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions::addSelectField
  * @covers MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions::getSelectFields
  */
 public function testAddSelectField()
 {
     // Setup
     $options = new QueryEntitiesOptions();
     $field = 'customerId';
     $expected = array($field);
     // Test
     $options->addSelectField($field);
     // Assert
     $this->assertEquals($expected, $options->getSelectFields());
 }
 public function testCheckQueryEntitiesOptions()
 {
     $options = new QueryEntitiesOptions();
     $query = new Query();
     $nextPartitionKey = 'aaa';
     $nextRowKey = 'bbb';
     $this->assertNull($options->getNextPartitionKey(), 'Default QueryEntitiesOptions->getNextPartitionKey');
     $this->assertNull($options->getNextRowKey(), 'Default QueryEntitiesOptions->getNextRowKey');
     $this->assertNotNull($options->getQuery(), 'Default QueryEntitiesOptions->getQuery');
     $options->setNextPartitionKey($nextPartitionKey);
     $options->setNextRowKey($nextRowKey);
     $options->setQuery($query);
     $this->assertEquals($nextPartitionKey, $options->getNextPartitionKey(), 'Set QueryEntitiesOptions->getNextPartitionKey');
     $this->assertEquals($nextRowKey, $options->getNextRowKey(), 'Set QueryEntitiesOptions->getNextRowKey');
     $this->assertEquals($query, $options->getQuery(), 'Set QueryEntitiesOptions->getQuery');
     $options->addSelectField('bar');
     $options->addSelectField('baz');
     $this->assertNotNull($options->getSelectFields(), 'Add $options->getSelectFields');
     $this->assertNotNull($options->getQuery()->getSelectFields(), 'Add $options->getQuery->getSelectFields');
     $this->assertEquals(2, count($options->getSelectFields()), 'Add $options->getSelectFields->size');
     $this->assertEquals(2, count($options->getQuery()->getSelectFields()), 'Add $options->getQuery->getSelectFields->size');
     $filter = Filter::applyConstant('foo', EdmType::STRING);
     $options->setFilter($filter);
     $options->setSelectFields(null);
     $options->setTop(TableServiceFunctionalTestData::INT_MAX_VALUE);
     $this->assertEquals($filter, $options->getFilter(), 'Set $options->getFilter');
     $this->assertEquals($filter, $options->getQuery()->getFilter(), 'Set $options->getQuery->getFilter');
     $this->assertNull($options->getSelectFields(), 'Set $options->getSelectFields');
     $this->assertNull($options->getQuery()->getSelectFields(), 'Set $options->getQuery->getSelectFields');
     $this->assertEquals(TableServiceFunctionalTestData::INT_MAX_VALUE, $options->getTop(), 'Set $options->getTop');
     $this->assertEquals(TableServiceFunctionalTestData::INT_MAX_VALUE, $options->getQuery()->getTop(), 'Set $options->getQuery->getTop');
 }