/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
- //
- // LeafTests.m
- // PSTTreeGraphTests
- //
- // Created by Ed Preston on 26/08/11.
- // Copyright 2011 Preston Software. All rights reserved.
- //
- #import "LeafTests.h"
- @implementation LeafTests
- - (void)setUp
- {
- [super setUp];
-
- // Set-up code here.
-
-
- aLeaf = [[PSBaseLeafView alloc] initWithFrame:CGRectZero];
- STAssertNotNil(aLeaf, @"Couldn't create leaf view.");
-
-
- }
- - (void)tearDown
- {
- // Tear-down code here.
-
- [aLeaf release];
-
- [super tearDown];
- }
- - (void)testSelectionState
- {
- STAssertFalse(aLeaf.showingSelected, @"Leaf nodes should not be selected by default.");
-
- aLeaf.showingSelected = YES;
- STAssertTrue(aLeaf.showingSelected, @"showingSelected property assignment failed.");
-
- aLeaf.showingSelected = NO;
- STAssertFalse(aLeaf.showingSelected, @"showingSelected property assignment failed.");
- }
- @end