mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
34 lines
891 B
Plaintext
34 lines
891 B
Plaintext
// Just doing @import <AppKit/CPCollectionView.j> failed on CPWindow not being defined somewhere.
|
|
@import <AppKit/AppKit.j>
|
|
|
|
@implementation CPCollectionViewTest : OJTestCase
|
|
{
|
|
CPCollectionView _collectionView;
|
|
}
|
|
|
|
- (void)setUp
|
|
{
|
|
_collectionView = [[CPCollectionView alloc] initWithFrame:CGRectMakeZero()];
|
|
}
|
|
|
|
- (void)testItemPrototypeActuallyReturnsTheItemPrototype
|
|
{
|
|
var itemPrototype = [[CPCollectionViewItem alloc] init];
|
|
[_collectionView setItemPrototype:itemPrototype];
|
|
|
|
[self assert:itemPrototype same:[_collectionView itemPrototype]];
|
|
}
|
|
|
|
- (void)testIsSelectableGetter
|
|
{
|
|
var collectionView = [[CPCollectionView alloc] initWithFrame:CGRectMakeZero()];
|
|
|
|
[collectionView setSelectable:YES];
|
|
[self assertTrue:[collectionView isSelectable]];
|
|
|
|
[collectionView setSelectable:NO];
|
|
[self assertFalse:[collectionView isSelectable]];
|
|
}
|
|
|
|
@end
|