Java Code Examples for org.jboss.arquillian.api.Deployment

The following are top voted examples for showing how to use org.jboss.arquillian.api.Deployment. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: actionbazaar   File: BasicPersistenceTest.java   View source code 6 votes vote down vote up
@Deployment(name="glassfish",testable = true)
public static WebArchive createDeployment() {
    WebArchive wa = ShrinkWrap.create(WebArchive.class, "test.jar")
        .addPackage(Address.class.getPackage()).addPackage(Bid.class.getPackage())
        .addPackage(BidService.class.getPackage())
        .addAsResource(new StringAsset(
                Descriptors.create(PersistenceDescriptor.class)
                        .persistenceUnit("actionbazaar")
                        .provider("oracle.toplink.essentials.PersistenceProvider")
                        .transactionType(TransactionType.JTA)
                        .jtaDataSource("jdbc/actionbazaar")
                        .schemaGenerationMode(SchemaGenerationModeType.CREATE_DROP)
                        .exportAsString()), "META-INF/persistence.xml");
    wa.addAsWebInfResource(new File("src/test/resources/web.xml"), "src/test/resources/web.xml");
    return wa;
}
 
Example 2
Project: JavaEE   File: OrderProcessorTest.java   View source code 5 votes vote down vote up
/**
 * Creates a deployment item.
 * @return ShrinkWrap
 */
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar").addClasses(OrderProcessor.class,
            OrderProcessorBean.class,UserService.class,UserServiceBean.class,
            ItemService.class,
            ItemServiceBean.class, Bid.class, Bidder.class, Item.class).addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));
}
 
Example 3
Project: JavaEE   File: UserServiceTest.java   View source code 5 votes vote down vote up
/**
 * Creates a deployment item.
 * @return ShrinkWrap
 */
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar").addClasses(OrderProcessor.class,
            OrderProcessorBean.class,UserService.class,UserServiceBean.class,
            ItemService.class,
            ItemServiceBean.class, Bid.class, Bidder.class, Item.class).addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));
}
 
Example 4
Project: JavaEE   File: ItemServiceTest.java   View source code 5 votes vote down vote up
/**
 * Creates a deployment item.
 * @return ShrinkWrap
 */
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar").addClasses(OrderProcessor.class,
            OrderProcessorBean.class,
            ItemService.class,
            ItemServiceBean.class, Bid.class, Bidder.class, Item.class).addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));
}
 
Example 5
Project: actionbazaar   File: OrderProcessorTest.java   View source code 5 votes vote down vote up
/**
 * Creates a deployment item.
 * @return ShrinkWrap
 */
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar").addClasses(OrderProcessor.class,
            OrderProcessorBean.class,UserService.class,UserServiceBean.class,
            ItemService.class,
            ItemServiceBean.class, Bid.class, Bidder.class, Item.class).addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));
}
 
Example 6
Project: actionbazaar   File: UserServiceTest.java   View source code 5 votes vote down vote up
/**
 * Creates a deployment item.
 * @return ShrinkWrap
 */
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar").addClasses(OrderProcessor.class,
            OrderProcessorBean.class,UserService.class,UserServiceBean.class,
            ItemService.class,
            ItemServiceBean.class, Bid.class, Bidder.class, Item.class).addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));
}
 
Example 7
Project: actionbazaar   File: ItemServiceTest.java   View source code 5 votes vote down vote up
/**
 * Creates a deployment item.
 * @return ShrinkWrap
 */
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar").addClasses(OrderProcessor.class,
            OrderProcessorBean.class,
            ItemService.class,
            ItemServiceBean.class, Bid.class, Bidder.class, Item.class).addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));
}
 
Example 8
Project: JavaEE   File: HelloUserBeanTest.java   View source code 4 votes vote down vote up
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar")
    .addClasses(HelloUserBean.class);
}
 
Example 9
Project: actionbazaar   File: HelloUserBeanTest.java   View source code 4 votes vote down vote up
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(JavaArchive.class, "foo.jar")
    .addClasses(HelloUserBean.class);
}
 
Example 10
Project: ldap2rest   File: BaseRESTUnit.java   View source code 4 votes vote down vote up
@Deployment()
public static WebArchive createDeployment() {
    return ShrinkWrap.create(WebArchive.class, "test.war").addClass(RESTApplication.class).
            setWebXML(new File(WEB_XML));

}