Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ____ _____
- / ___| ___ __ _ _ __ ___ | ___|__ _ __ __ _ ___
- \___ \ / _ \/ _` | '_ ` _ \ | |_ / _ \| '__/ _` |/ _ \ \\
- ___) | __/ (_| | | | | | | | _| (_) | | | (_| | __/ //
- |____/ \___|\__,_|_| |_| |_| |_| \___/|_| \__, |\___|
- |___/
- [forge-parent] seam-forge/ $
- [forge-parent] seam-forge/ $ new-project --named test --topLevelPackage com.test
- Use [/home/aslak/dev/source/seam/seam-forge/test] as project directory? [Y/n]
- Wrote /home/aslak/dev/source/seam/seam-forge/test/pom.xml
- Wrote /home/aslak/dev/source/seam/seam-forge/test/src/main/java/com/test/HelloWorld.java
- Wrote /home/aslak/dev/source/seam/seam-forge/test/src/main/resources/META-INF/forge.xml
- ***SUCCESS*** Created project [test] in new working directory [/home/aslak/dev/source/seam/seam-forge/test]
- [test] test/ $ install arquillian
- Which version of Arquillian would you like to install?
- 1 - [1.0.0.Alpha1]
- 2 - [1.0.0.Alpha2]
- 3 - [1.0.0.Alpha3]
- 4 - [1.0.0.Alpha4]
- Choose an option by typing the number of the selection: 4
- Which test framework would you like to use?
- 1 - [JUnit]
- 2 - [TestNG]
- Choose an option by typing the number of the selection: 1
- Installation completed successfully.
- [test] test/ $ new-ejb --named ResourceService
- What type of Enterprise Java Bean would you like to create?
- 1 - [Stateless]
- 2 - [Stateful]
- 3 - [MessageDriven]
- Choose an option by typing the number of the selection: 1
- In which package you'd like to create the @Stateless bean, or enter for default: [com.test.service]
- Wrote /home/aslak/dev/source/seam/seam-forge/test/src/main/java/com/test/service/ResourceService.java
- Created [Stateless] Enterprise Java Bean [ResourceService]
- A Enterprise Java Bean was just created. Would you like to create a test for [ResourceService] [Y/n]
- What would you like to call the test case? [ResourceServiceTestCase]
- Wrote /home/aslak/dev/source/seam/seam-forge/test/src/test/java/com/test/service/ResourceServiceTestCase.java
- [test] test/ $ exit
- $ cat /home/aslak/dev/source/seam/seam-forge/test/src/main/java/com/test/service/ResourceService.java
- package com.test.service;
- import javax.ejb.Stateless;
- @Stateless
- public class ResourceService
- {
- }
- $ cat /home/aslak/dev/source/seam/seam-forge/test/src/test/java/com/test/service/ResourceServiceTestCase.java
- package com.test.service;
- import org.junit.runner.RunWith;
- import org.jboss.arquillian.junit.Arquillian;
- import org.jboss.shrinkwrap.api.ShrinkWrap;
- import org.jboss.shrinkwrap.api.spec.JavaArchive;
- import com.test.service.ResourceService;
- import org.jboss.arquillian.api.Deployment;
- import javax.ejb.EJB;
- import org.junit.Test;
- @RunWith(Arquillian.class)
- public class ResourceServiceTestCase
- {
- @Deployment
- public Archive createDeployment()
- {
- return ShrinkWrap.create(JavaArchive.class, "test.jar").addClass(ResourceService.class);
- }
- @EJB
- private ResourceService resourceservice;
- @Test
- public void shouldBeAbleToInvokeResourceService()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment