コード例 #1
0
 /**
  * @covers WindowsAzure\Table\TableRestProxy::insertEntity
  * @covers WindowsAzure\Table\TableRestProxy::queryEntities
  */
 public function testInsertEntityDoubleNegative()
 {
     foreach (TableServiceFunctionalTestData::getInterestingBadDoubles() as $o) {
         $ent = new Entity();
         $ent->setPartitionKey(TableServiceFunctionalTestData::getNewKey());
         $ent->setRowKey(TableServiceFunctionalTestData::getNewKey());
         try {
             $ent->addProperty('DOUBLE', EdmType::DOUBLE, $o);
             $this->fail('Should get an exception when trying to parse this value');
             $this->insertEntityWorker($ent, false, null, $o);
         } catch (\Exception $e) {
             $this->assertEquals(0, $e->getCode(), 'getCode');
             $this->assertTrue(true, 'got expected exception');
         }
     }
 }