Skip to content

Commit 5a1918b

Browse files
committed
Merge pull request #209 from kubamarchwicki/statless-correction
Fixing #205. Removing spec not compliant assertions
2 parents cc234aa + 30cbdd6 commit 5a1918b

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

ejb/stateless/src/test/java/org/javaee7/ejb/stateless/AccountSessionStatelessnessTest.java

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.jboss.arquillian.container.test.api.Deployment;
44
import org.jboss.arquillian.junit.Arquillian;
5-
import org.jboss.arquillian.junit.InSequence;
65
import org.jboss.shrinkwrap.api.Archive;
76
import org.jboss.shrinkwrap.api.ShrinkWrap;
87
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
@@ -12,18 +11,15 @@
1211

1312
import 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)
2321
public 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

Comments
 (0)