PageRenderTime 27ms CodeModel.GetById 21ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Unit Tests/PSTTreeGraphTests/LeafTests.m

https://code.google.com/
Objective C | 46 lines | 22 code | 15 blank | 9 comment | 0 complexity | f5371ad3177d9e9d6625a09b7385a72d MD5 | raw file
 1//
 2//  LeafTests.m
 3//  PSTTreeGraphTests
 4//
 5//  Created by Ed Preston on 26/08/11.
 6//  Copyright 2011 Preston Software. All rights reserved.
 7//
 8
 9#import "LeafTests.h"
10
11@implementation LeafTests
12
13- (void)setUp
14{
15    [super setUp];
16    
17    // Set-up code here.
18    
19    
20    aLeaf = [[PSBaseLeafView alloc] initWithFrame:CGRectZero];
21    STAssertNotNil(aLeaf, @"Couldn't create leaf view.");
22    
23    
24}
25
26- (void)tearDown
27{
28    // Tear-down code here.
29    
30    [aLeaf release];
31    
32    [super tearDown];
33}
34
35- (void)testSelectionState
36{
37    STAssertFalse(aLeaf.showingSelected, @"Leaf nodes should not be selected by default.");
38    
39    aLeaf.showingSelected = YES;
40    STAssertTrue(aLeaf.showingSelected, @"showingSelected property assignment failed.");
41    
42    aLeaf.showingSelected = NO;
43    STAssertFalse(aLeaf.showingSelected, @"showingSelected property assignment failed.");
44}
45
46@end