Add test for maxsize/offset/limit collections
This commit is contained in:
parent
b0c72c989e
commit
1b58896a2e
2 changed files with 20 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
tests = [
|
||||
"testSize",
|
||||
"testMaxSize",
|
||||
"testAddRemoveSmall",
|
||||
"testAddRemoveLarge",
|
||||
"testListSmall",
|
||||
|
@ -21,6 +22,17 @@ function testSize() {
|
|||
assertEqual(helma.persons.size(), small);
|
||||
}
|
||||
|
||||
function testMaxSize() {
|
||||
assertEqual(ikea.range.size(), 100);
|
||||
assertEqual(helma.range.size(), 0);
|
||||
var person = ikea.range.get("Person Ikea 0150");
|
||||
assertNotNull(person);
|
||||
assertEqual(person, ikea.range.get(50));
|
||||
assertEqual(person, ikea.persons.get(150));
|
||||
assertEqual(50, ikea.range.indexOf(person));
|
||||
assertEqual(150, ikea.persons.indexOf(person));
|
||||
}
|
||||
|
||||
function testAddRemoveSmall(org) {
|
||||
testAddRemove(helma, small);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue