PageRenderTime 18ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Tests/AppKit/CPSearchFieldTest.j

http://github.com/cacaodev/cappuccino
Unknown | 30 lines | 24 code | 6 blank | 0 comment | 0 complexity | 377e37037d47fdb9214b464009a79b78 MD5 | raw file
 1@import <AppKit/AppKit.j>
 2
 3@implementation CPSearchFieldTest : OJTestCase
 4{
 5    CPSearchField _searchField;
 6}
 7
 8- (void)setUp
 9{
10    _searchField = [[CPSearchField alloc] initWithFrame:CGRectMakeZero()];
11}
12
13- (void)testMakeCPSearchFieldInstance
14{
15    [self assertNotNull:_searchField];
16}
17
18- (void)testRecentSearchesStartsEmpty
19{
20    [self assertTrue:[[_searchField recentSearches] count] == 0 message:@"After instance creation we shouldn't have any recent searches."];
21}
22
23- (void)testSetRecentSearches
24{
25    var searches = ["foo", "bar", "baz"];
26    [_searchField setRecentSearches:searches]
27    [self assertTrue:[[_searchField recentSearches] count] == 3 message:@"After setRecentSearches array doesn't include results"];
28}
29
30@end