/** * Test Test Insert No Key */ function testInsertNoKey() { $this->initScript('line-item-init.sql'); $item = new LineItem(); $item->setId(100); $item->setCode("blah"); $item->setOrder(new Order()); $item->getOrder()->setId(9); $item->setPrice(44.0); $item->setQuantity(1); $key = $this->sqlmap->Insert("InsertLineItemNoKey", $item); $this->assertNull($key); $this->assertIdentical(100, $item->getId()); $param["Order_ID"] = 9; $param["LineItem_ID"] = 100; $testItem = $this->sqlmap->QueryForObject("GetSpecificLineItem", $param); $this->assertNotNull($testItem); $this->assertIdentical(100, $testItem->getId()); $this->initScript('line-item-init.sql'); }