mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 10:20:59 +00:00
test observations during setSelectionIndexes
This commit is contained in:
1 parent
d8c0d2da8e
commit
c9e0ab654f
1 file changed
+13
@@ -245,6 +245,19 @@
|
||||
[self assert:[CPIndexSet indexSetWithIndex:0] equals:observation.newValue message:"new selected index should be 0"];
|
||||
}
|
||||
|
||||
- (void)testObservationDuringSetSelectionIndexes
|
||||
{
|
||||
var arrayController = [self arrayController],
|
||||
newContent = [self setupObservationFixture];
|
||||
|
||||
var newSelection = [CPIndexSet indexSetWithIndex:2];
|
||||
[arrayController setSelectionIndexes:newSelection];
|
||||
|
||||
[self assertNotNull:[arrayController selection] message:@"a selection was made, selection proxy should be defined"];
|
||||
[self assert:2 equals:[observations count] message:@"exactly 2 change notifications should be sent for new selection indexes"];
|
||||
[self assert:newSelection equals:[arrayController selectionIndexes] message:@"selection was not set properly"];
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:keyPath
|
||||
ofObject:anActivity
|
||||
change:change
|
||||
|
||||
Reference in new issue
Block a user