Skip to content

Commit

Permalink
Naive tests for a web bean
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@162 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Oct 26, 2008
1 parent ff5fa4b commit ffbe404
Showing 1 changed file with 19 additions and 5 deletions.
@@ -1,5 +1,12 @@
package org.jboss.webbeans.test;

import static org.jboss.webbeans.test.util.Util.createSimpleModel;

import javax.webbeans.Production;
import javax.webbeans.RequestScoped;

import org.jboss.webbeans.model.bean.BeanModel;
import org.jboss.webbeans.test.beans.RedSnapper;
import org.testng.annotations.Test;

/**
Expand All @@ -8,30 +15,37 @@
* @author Pete Muir
*
*/
public class CommonWebBeanTest {
public class CommonWebBeanTest extends AbstractTest
{

// TODO This should actually somehow test the reverse - that the container throws a definition exception if any of these occur

@Test @SpecAssertion(section="2")
public void testApiTypesNonEmpty()
{
assert false;
BeanModel<?, ?> model = createSimpleModel(RedSnapper.class, manager);
assert model.getApiTypes().size() > 0;
}

@Test @SpecAssertion(section="2")
public void testBindingTypesNonEmpty()
{
assert false;
BeanModel<?, ?> model = createSimpleModel(RedSnapper.class, manager);
assert model.getBindingTypes().size() > 0;
}

@Test @SpecAssertion(section="2")
public void testHasScopeType()
{
assert false;
BeanModel<?, ?> model = createSimpleModel(RedSnapper.class, manager);
assert model.getScopeType().equals(RequestScoped.class);
}

@Test @SpecAssertion(section="2")
public void testHasDeploymentType()
{
assert false;
BeanModel<?, ?> model = createSimpleModel(RedSnapper.class, manager);
assert model.getDeploymentType().equals(Production.class);
}

}

0 comments on commit ffbe404

Please sign in to comment.