public static function tearDownAfterClass()
 {
     if (self::$isOneTimeSetup) {
         $testBase = new FunctionalTestBase();
         $testBase->setUp();
         foreach (TableServiceFunctionalTestData::$testTableNames as $name) {
             $testBase->safeDeleteTable($name);
         }
         self::$isOneTimeSetup = false;
     }
     parent::tearDownAfterClass();
 }
 public static function tearDownAfterClass()
 {
     if (self::$isOneTimeSetup) {
         self::$isOneTimeSetup = false;
     }
     parent::tearDownAfterClass();
 }
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $table = TableServiceFunctionalTestData::$TEST_TABLE_NAMES[0];
     self::$entitiesInTable = self::getEntitiesToQueryOver();
     $baseWithRestProxy = new FunctionalTestBase();
     $parts = array();
     foreach (self::$entitiesInTable as $entity) {
         if (array_key_exists($entity->getPartitionKey(), $parts) === false) {
             $parts[$entity->getPartitionKey()] = array();
         }
         array_push($parts[$entity->getPartitionKey()], $entity);
     }
     foreach ($parts as $part) {
         $batch = new BatchOperations();
         foreach ($part as $entity) {
             $batch->addInsertEntity($table, $entity);
         }
         $baseWithRestProxy->restProxy->batch($batch);
     }
 }
 public static function tearDownAfterClass()
 {
     parent::tearDownAfterClass();
 }
 public static function filterToString($filter, $pad = '  ')
 {
     if (is_null($filter)) {
         return $pad . 'filter <null>' . "\n";
     } else {
         if ($filter instanceof PropertyNameFilter) {
             return $pad . 'entity.' . $filter->getPropertyName() . "\n";
         } else {
             if ($filter instanceof ConstantFilter) {
                 $ret = $pad;
                 if (is_null($filter->getValue())) {
                     $ret .= 'constant <null>';
                 } else {
                     if (is_bool($filter->getValue())) {
                         $ret .= $filter->getValue() ? 'true' : 'false';
                     } else {
                         $ret .= '\'' . FunctionalTestBase::tmptostring($filter->getValue()) . '\'';
                     }
                 }
                 return $ret . "\n";
             } else {
                 if ($filter instanceof UnaryFilter) {
                     $ret = $pad . $filter->getOperator() . "\n";
                     $ret .= self::filterToString($filter->getOperand(), $pad . '  ');
                     return $ret;
                 } else {
                     if ($filter instanceof BinaryFilter) {
                         $ret = self::filterToString($filter->getLeft(), $pad . '  ');
                         $ret .= $pad . $filter->getOperator() . "\n";
                         $ret .= self::filterToString($filter->getRight(), $pad . '  ');
                         return $ret;
                     }
                 }
             }
         }
     }
 }