Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import java.util.List;

import static org.hamcrest.CoreMatchers.is;

/**
* @author <a href="http://community.jboss.org/people/dan.j.allen">Dan Allen</a>
*/
Expand Down Expand Up @@ -68,5 +72,6 @@ public void place_order_should_add_order() {
@InSequence(2)
public void order_should_be_persistent() {
Assert.assertEquals(2, repo.getOrderCount());
Assert.assertThat("First order must have sunglasses on its 1. position","sunglasses", is(repo.getOrders().get(0).get(0)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class SingletonOrderRepository implements OrderRepository {
@Override
@Lock(LockType.WRITE)
public void addOrder(List<String> order) {
orders.add(order);
orders.add(new ArrayList<String>(order));
}

@Override
Expand Down