Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
[#SDV-202] Extend unit tests for LodgingChecklist
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulVM committed Feb 4, 2015
1 parent 42482ff commit be3345b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/OpgTest/Core/Model/Entity/Document/LodgingChecklistTest.php
Expand Up @@ -32,6 +32,16 @@ public function testGetSetDirection()
$this->assertEquals(Document::DIRECTION_INTERNAL, $this->checklist->setDirection(Document::DIRECTION_INTERNAL)->getDirection());
}

public function testGetSetTotalAssets()
{
$expected = 1024.00;

$this->assertEmpty($this->checklist->getTotalAssets());
$this->assertTrue($this->checklist->setTotalAssets($expected) instanceof LodgingChecklist);

$this->assertEquals($expected, $this->checklist->getTotalAssets());
}

public function testGetSetStartEndDates()
{
$expectedStart = new \DateTime('1970-10-01');
Expand Down
9 changes: 9 additions & 0 deletions tests/OpgTest/Core/Model/Entity/LineItem/LineItemTest.php
Expand Up @@ -2,6 +2,7 @@

namespace OpgTest\Core\Model\Entity\LineItem;

use Opg\Core\Model\Entity\Document\LodgingChecklist;
use Opg\Core\Model\Entity\LineItem\LineItem;

class LineItemTest extends \PHPUnit_Framework_TestCase
Expand All @@ -22,6 +23,14 @@ public function testGetSetId()
$this->assertEquals($expected, $this->lineItem->getId());
}

public function testGetSetDocument()
{
$expected = new LodgingChecklist();
$this->assertEmpty($this->lineItem->getDocument());
$this->assertTrue($this->lineItem->setDocument($expected) instanceof LineItem);
$this->assertEquals($expected, $this->lineItem->getDocument());
}

public function testGetSetLineItemName()
{
$expected = 'line item name';
Expand Down

0 comments on commit be3345b

Please sign in to comment.