public function testSetQuantityType() { $this->tradeData->setQuantityType(TradeData::QUANTITY_TYPE_ALL_SHARES); $this->assertEquals(TradeData::QUANTITY_TYPE_ALL_SHARES, $this->tradeData->getQuantityType()); $this->tradeData->setQuantityType('s'); $this->assertEquals(TradeData::QUANTITY_TYPE_SHARES, $this->tradeData->getQuantityType()); $this->tradeData->setQuantityType('as'); $this->assertEquals(TradeData::QUANTITY_TYPE_ALL_SHARES, $this->tradeData->getQuantityType()); $this->setExpectedException('Exception', 'Quantity Type must be S or AS'); $this->tradeData->setQuantityType('bbb'); }