Skip to content

Commit

Permalink
fix bad assumption
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Jul 29, 2010
1 parent 01301da commit d6edf01
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
@@ -0,0 +1,14 @@
package org.jboss.weld.tests.resolution.circular.resource;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

@Entity
public class Bar
{

@Id @GeneratedValue
private int id;

}
Expand Up @@ -24,12 +24,18 @@
public class Baz
{

@Produces @FooDB @PersistenceContext private EntityManager db;
@Inject @FooDB EntityManager fooDb;

@Produces
@FooDB
@PersistenceContext
private EntityManager db;

@Inject
@FooDB
private EntityManager fooDb;

public EntityManager getFooDb()
{
return fooDb;
}

}
Expand Up @@ -43,6 +43,6 @@ public static Archive<?> deploy()
@Test
public void testResourceProducerField(Baz baz) throws Exception
{
Assert.assertTrue(baz.getFooDb().isOpen());
Assert.assertFalse(baz.getFooDb().contains(new Bar()));
}
}

0 comments on commit d6edf01

Please sign in to comment.