/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. #import "LeafTests.h"
  9. @implementation LeafTests
  10. - (void)setUp
  11. {
  12. [super setUp];
  13. // Set-up code here.
  14. aLeaf = [[PSBaseLeafView alloc] initWithFrame:CGRectZero];
  15. STAssertNotNil(aLeaf, @"Couldn't create leaf view.");
  16. }
  17. - (void)tearDown
  18. {
  19. // Tear-down code here.
  20. [aLeaf release];
  21. [super tearDown];
  22. }
  23. - (void)testSelectionState
  24. {
  25. STAssertFalse(aLeaf.showingSelected, @"Leaf nodes should not be selected by default.");
  26. aLeaf.showingSelected = YES;
  27. STAssertTrue(aLeaf.showingSelected, @"showingSelected property assignment failed.");
  28. aLeaf.showingSelected = NO;
  29. STAssertFalse(aLeaf.showingSelected, @"showingSelected property assignment failed.");
  30. }
  31. @end