Created
March 12, 2012 11:54
-
-
Save milenkovicm/2021382 to your computer and use it in GitHub Desktop.
[Junit] Arquillian - use of @ShouldThrowException(Exception.class) at @deployment method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.jboss.weld.tests.xml.broken.stereotype; | |
import org.jboss.arquillian.container.test.api.Deployment; | |
import org.jboss.arquillian.container.test.api.ShouldThrowException; | |
import org.jboss.arquillian.junit.Arquillian; | |
import org.jboss.shrinkwrap.api.Archive; | |
import org.jboss.shrinkwrap.api.BeanArchive; | |
import org.jboss.shrinkwrap.api.ShrinkWrap; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
@RunWith(Arquillian.class) | |
public class BeansXmlTest { | |
@Deployment | |
@ShouldThrowException(Exception.class) | |
public static Archive<?> deploy() { | |
return ShrinkWrap.create(BeanArchive.class) | |
.stereotype(Foo.class) | |
.addPackage(BeansXmlTest.class.getPackage()); | |
} | |
@Test | |
public void testStereotypeRespectedInBeansXml() { | |
//assert false; // Arquillian ShouldThrowException marks it as allowed, does not stop @Test from execution | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment