Skip to content

Commit

Permalink
Implemented test- case for ArrayList- remove
Browse files Browse the repository at this point in the history
  • Loading branch information
johanhasselstrom committed Dec 2, 2011
1 parent f4ccddb commit a98aaca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/spec/ArrayList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ describe('javascript.util.ArrayList', function() {
var iterator;
var first;
var second;
var toBeRemoved;

it('can be constructed', function() {
arrayList = new javascript.util.ArrayList();
Expand Down Expand Up @@ -60,5 +61,12 @@ describe('javascript.util.ArrayList', function() {
}
expect(count).toEqual(2);
});

it('can remove an item', function() {
var count = arrayList.size();
arrayList.add(toBeRemoved);
arrayList.remove(toBeRemoved);
expect(arrayList.size()).toEqual(count);
});
});

0 comments on commit a98aaca

Please sign in to comment.