Skip to content

Commit

Permalink
added other entity creation test
Browse files Browse the repository at this point in the history
  • Loading branch information
lpmaurice committed Mar 23, 2011
1 parent 0603789 commit ac8fe7b
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions test/ember/EntityManagerTest.as
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package ember
{
import asunit.framework.TestCase;

import com.tomseysdavies.ember.base.EntityManager;
import com.tomseysdavies.ember.core.IEntity;

public class EntityManagerTest extends TestCase
{
public function EntityManagerTest()
Expand All @@ -11,12 +14,28 @@ package ember

override protected function setUp():void
{

_entityManager = new EntityManager();
}

override protected function tearDown():void
{
_entityManager.destroy();
_entityManager = null;
}

public function testFailure():void
public function testEntityWithoutIDCreated():void
{
assertTrue(false);
var entity:IEntity = _entityManager.createEntity();
assertNotNull("Entity was created WITHOUT an id specified.", entity);
}

public function testEntityWithIDCreated():void
{
var entity:IEntity = _entityManager.createEntity('SOME_ID');
assertNotNull("Entity was created WITH an id specified.", entity);
}

//_________________PRIVATE
private var _entityManager:EntityManager;
}
}

0 comments on commit ac8fe7b

Please sign in to comment.