22
33import org .jboss .arquillian .container .test .api .Deployment ;
44import org .jboss .arquillian .junit .Arquillian ;
5- import org .jboss .arquillian .junit .InSequence ;
65import org .jboss .shrinkwrap .api .Archive ;
76import org .jboss .shrinkwrap .api .ShrinkWrap ;
87import org .jboss .shrinkwrap .api .asset .EmptyAsset ;
1211
1312import javax .ejb .EJB ;
1413
15- import static org .hamcrest .MatcherAssert .assertThat ;
16- import static org .hamcrest .Matchers .equalTo ;
17- import static org .hamcrest .Matchers .is ;
14+ import static org .hamcrest .MatcherAssert .*;
15+ import static org .hamcrest .Matchers .*;
1816
1917/**
2018 * @author Jakub Marchwicki
2119 */
2220@ RunWith (Arquillian .class )
2321public class AccountSessionStatelessnessTest {
2422
25- final private float deposit_amount = 10f ;
26-
2723 @ EJB
2824 AccountSessionBean account1 ;
2925
@@ -47,25 +43,7 @@ public static Archive<?> deployment() {
4743 * stateless session bean have the same object identity.
4844 */
4945 @ Test
50- @ InSequence (1 )
5146 public void should_be_identical_beans () {
5247 assertThat ("Expect same instances" , account1 , is (account2 ));
5348 }
54-
55- @ Test
56- @ InSequence (2 )
57- public void should_deposit_amount_on_first_account () {
58- assertThat (account1 .getAmount (), equalTo (0f ));
59-
60- String actual = account1 .deposit (deposit_amount );
61-
62- assertThat (actual , is (equalTo ("Deposited: " + deposit_amount )));
63- assertThat (account1 .getAmount (), equalTo (0f ));
64- }
65-
66- @ Test
67- @ InSequence (3 )
68- public void should_contain_already_deposited_amount_on_second_account () {
69- assertThat (account2 .getAmount (), equalTo (account1 .getAmount ()));
70- }
7149}
0 commit comments