public function testSelectShardNoDistriubtionValue()
 {
     $conn = $this->createConnection(array('sharding' => array('federationName' => 'abc', 'distributionKey' => 'foo', 'distributionType' => 'integer')));
     $conn->expects($this->at(1))->method('isTransactionActive')->will($this->returnValue(false));
     $this->setExpectedException('Doctrine\\Shards\\DBAL\\ShardingException', 'You have to specify a string or integer as shard distribution value.');
     $sm = new SQLAzureShardManager($conn);
     $sm->selectShard(null);
 }
 private function getCreateFederationStatement()
 {
     $federationType = Type::getType($this->shardManager->getDistributionType());
     $federationTypeSql = $federationType->getSqlDeclaration(array(), $this->conn->getDatabasePlatform());
     return "--Create Federation\n" . "CREATE FEDERATION " . $this->shardManager->getFederationName() . " (" . $this->shardManager->getDistributionKey() . " " . $federationTypeSql . "  RANGE)";
 }