-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tidy up and add failing test for TyphoonScopeObjectGraph
- Loading branch information
Jasper Blues
committed
Jan 26, 2014
1 parent
27c16c9
commit a1007d2
Showing
35 changed files
with
3,174 additions
and
2,946 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#import <Foundation/Foundation.h> | ||
#import "TyphoonAssembly.h" | ||
|
||
|
||
@interface ObjectGraphAssembly : TyphoonAssembly | ||
|
||
- (id)objectGraphKnight; | ||
|
||
- (id)objectGraphQuest; | ||
|
||
- (id)prototypeKnight; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
|
||
#import <Typhoon/TyphoonDefinition.h> | ||
#import "ObjectGraphAssembly.h" | ||
#import "Knight.h" | ||
#import "Fort.h" | ||
#import "CampaignQuest.h" | ||
|
||
|
||
@implementation ObjectGraphAssembly | ||
|
||
- (id)objectGraphKnight | ||
{ | ||
return [TyphoonDefinition withClass:[Knight class] properties:^(TyphoonDefinition* definition) | ||
{ | ||
[definition injectProperty:@selector(homeFort) withDefinition:[self objectGraphFort]]; | ||
[definition injectProperty:@selector(quest) withDefinition:[self objectGraphQuest]]; | ||
}]; | ||
} | ||
|
||
- (id)objectGraphFort | ||
{ | ||
return [TyphoonDefinition withClass:[Fort class]]; | ||
} | ||
|
||
- (id)objectGraphQuest | ||
{ | ||
return [TyphoonDefinition withClass:[CampaignQuest class] properties:^(TyphoonDefinition* definition) | ||
{ | ||
[definition injectProperty:@selector(fort) withDefinition:[self objectGraphFort]]; | ||
}]; | ||
} | ||
|
||
/* ====================================================================================================================================== */ | ||
|
||
- (id)prototypeKnight | ||
{ | ||
return nil; | ||
} | ||
|
||
- (id)prototypeCastle | ||
{ | ||
return nil; | ||
} | ||
|
||
- (id)prototypeQuest | ||
{ | ||
return nil; | ||
} | ||
|
||
@end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#import <SenTestingKit/SenTestingKit.h> | ||
#import "ObjectGraphAssembly.h" | ||
#import "TyphoonBlockComponentFactory.h" | ||
#import "Knight.h" | ||
#import "CampaignQuest.h" | ||
#import "Fort.h" | ||
#import "OCLogTemplate.h" | ||
|
||
@interface TyphoonScopeTests : SenTestCase | ||
{ | ||
ObjectGraphAssembly* _assembly; | ||
} | ||
|
||
@end | ||
|
||
@implementation TyphoonScopeTests | ||
|
||
- (void)setUp | ||
{ | ||
TyphoonBlockComponentFactory* factory = [TyphoonBlockComponentFactory factoryWithAssembly:[ObjectGraphAssembly assembly]]; | ||
_assembly = (ObjectGraphAssembly*)factory; | ||
} | ||
|
||
|
||
//- (void)test_object_graph_assembly | ||
//{ | ||
// Knight* knight = [_assembly objectGraphKnight]; | ||
// CampaignQuest* quest = [_assembly objectGraphQuest]; | ||
// | ||
// LogDebug(@"Knight's fort: %@", knight.homeFort); | ||
// LogDebug(@"Quest's fort: %@", quest.fort); | ||
// | ||
// assertThatBool(knight.homeFort == quest.fort, equalToBool(YES)); | ||
//} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#import <Foundation/Foundation.h> | ||
|
||
|
||
@interface Fort : NSObject | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TYPHOON FRAMEWORK | ||
// Copyright 2013, Jasper Blues & Contributors | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: The authors permit you to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
#import "Fort.h" | ||
|
||
|
||
@implementation Fort | ||
{ | ||
|
||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.