Showing preview only (1,071K chars total). Download the full file or copy to clipboard to get everything.
Repository: Skyscanner/Dixie
Branch: master
Commit: 292923f6802c
Files: 193
Total size: 1004.8 KB
Directory structure:
gitextract_dxkqxvqx/
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── Dixie/
│ ├── Dixie/
│ │ ├── ChaosProvider/
│ │ │ ├── BlockChaosProvider/
│ │ │ │ ├── DixieBlockChaosProvider.h
│ │ │ │ └── DixieBlockChaosProvider.m
│ │ │ ├── CompositeChaosProvider/
│ │ │ │ ├── DixieCompositeChaosProvider.h
│ │ │ │ ├── DixieCompositeChaosProvider.m
│ │ │ │ ├── DixieCompositeCondition.h
│ │ │ │ └── DixieCompositeCondition.m
│ │ │ ├── ConstantChaosProvider/
│ │ │ │ ├── DixieConstantChaosProvider.h
│ │ │ │ └── DixieConstantChaosProvider.m
│ │ │ ├── DixieBaseChaosProvider.h
│ │ │ ├── DixieBaseChaosProvider.m
│ │ │ ├── DixieChaosContext.h
│ │ │ ├── DixieChaosContext.m
│ │ │ ├── ExceptionChaosProvider/
│ │ │ │ ├── DixieExceptionChaosProvider.h
│ │ │ │ └── DixieExceptionChaosProvider.m
│ │ │ ├── NilChaosProvider/
│ │ │ │ ├── DixieNilChaosProvider.h
│ │ │ │ └── DixieNilChaosProvider.m
│ │ │ ├── NonChaosProvider/
│ │ │ │ ├── DixieNonChaosProvider.h
│ │ │ │ └── DixieNonChaosProvider.m
│ │ │ ├── RandomChaosProvider/
│ │ │ │ ├── DixieRandomChaosProvider.h
│ │ │ │ └── DixieRandomChaosProvider.m
│ │ │ └── SequentialChaosProvider/
│ │ │ ├── DixieSequentialChaosProvider.h
│ │ │ └── DixieSequentialChaosProvider.m
│ │ ├── Dixie+Fluent/
│ │ │ ├── Dixie+Fluent.h
│ │ │ └── Dixie+Fluent.m
│ │ ├── Dixie.h
│ │ ├── Dixie.m
│ │ ├── DixieHeaders.h
│ │ ├── DixieLogger/
│ │ │ ├── DixieLogger.h
│ │ │ ├── DixieLogger.m
│ │ │ └── SimpleLogger/
│ │ │ ├── DixieSimpleLogger.h
│ │ │ └── DixieSimpleLogger.m
│ │ ├── MethodInfo/
│ │ │ ├── DixieMethodInfo.h
│ │ │ └── DixieMethodInfo.m
│ │ ├── ParamProvider/
│ │ │ ├── DixieBaseParamProvider.h
│ │ │ ├── DixieBaseParamProvider.m
│ │ │ └── RandomParamProvider/
│ │ │ ├── DixieRandomParamProvider.h
│ │ │ └── DixieRandomParamProvider.m
│ │ ├── ProfileEntry/
│ │ │ ├── DixieProfileEntry.h
│ │ │ └── DixieProfileEntry.m
│ │ ├── PuppetMaker/
│ │ │ ├── DixieDefaultPuppetMaker.h
│ │ │ ├── DixieDefaultPuppetMaker.m
│ │ │ └── DixiePuppetMaking.h
│ │ └── Runtime/
│ │ ├── DixieCallEnvironment.h
│ │ ├── DixieCallEnvironment.m
│ │ ├── DixieRunTimeHelper.h
│ │ ├── DixieRunTimeHelper.m
│ │ ├── NSObject+DixieRunTimeHelper.h
│ │ └── NSObject+DixieRunTimeHelper.m
│ ├── Dixie.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ ├── Dixie.xcscheme
│ │ └── DixieTests.xcscheme
│ └── DixieTests/
│ ├── Helpers/
│ │ ├── ChaosProviderTestClass.h
│ │ ├── ChaosProviderTestClass.m
│ │ ├── SubTestClass.h
│ │ ├── SubTestClass.m
│ │ ├── TestClass.h
│ │ ├── TestClass.m
│ │ ├── TestPuppetMaker.h
│ │ └── TestPuppetMaker.m
│ ├── Info.plist
│ ├── Predefined profiles/
│ │ ├── NSDateProfile.h
│ │ ├── NSDateProfile.m
│ │ ├── NSURLConnectionProfile.h
│ │ ├── NSURLConnectionProfile.m
│ │ ├── NSURLProfile.h
│ │ └── NSURLProfile.m
│ └── Units/
│ ├── DixieAPITests.m
│ ├── DixieChaosProviderTests.m
│ ├── ProfileEntryTests.m
│ ├── RandomParamProviderTests.m
│ └── RunTimeHelperTests.m
├── Dixie.podspec
├── DixieBasicChaos.codesnippet
├── DixieExampleApp/
│ ├── DixieExampleApp/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── CountDownViewController.h
│ │ ├── CountDownViewController.m
│ │ ├── Images.xcassets/
│ │ │ └── AppIcon.appiconset/
│ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── MapViewController.h
│ │ ├── MapViewController.m
│ │ ├── WeatherModel.h
│ │ ├── WeatherModel.m
│ │ ├── WeatherViewController.h
│ │ ├── WeatherViewController.m
│ │ └── main.m
│ ├── DixieExampleApp.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ ├── DixieExampleApp.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── Podfile
├── Documentation/
│ ├── docset/
│ │ └── Contents/
│ │ ├── Info.plist
│ │ └── Resources/
│ │ ├── Documents/
│ │ │ ├── Blocks/
│ │ │ │ ├── DixieCustomChaosBlock.html
│ │ │ │ └── DixieImplementationBlock.html
│ │ │ ├── Categories/
│ │ │ │ └── NSObject+DixieRunTimeHelper.html
│ │ │ ├── Classes/
│ │ │ │ ├── Dixie.html
│ │ │ │ ├── DixieBaseChaosProvider.html
│ │ │ │ ├── DixieBaseParamProvider.html
│ │ │ │ ├── DixieBlockChaosProvider.html
│ │ │ │ ├── DixieCallEnvironment.html
│ │ │ │ ├── DixieChaosContext.html
│ │ │ │ ├── DixieCompositeChaosProvider.html
│ │ │ │ ├── DixieCompositeCondition.html
│ │ │ │ ├── DixieConstantChaosProvider.html
│ │ │ │ ├── DixieDefaultPuppetMaker.html
│ │ │ │ ├── DixieExceptionChaosProvider.html
│ │ │ │ ├── DixieLogger.html
│ │ │ │ ├── DixieMethodInfo.html
│ │ │ │ ├── DixieNilChaosProvider.html
│ │ │ │ ├── DixieNonChaosProvider.html
│ │ │ │ ├── DixieProfileEntry.html
│ │ │ │ ├── DixieRandomChaosProvider.html
│ │ │ │ ├── DixieRandomParamProvider.html
│ │ │ │ ├── DixieRunTimeHelper.html
│ │ │ │ ├── DixieSequentialChaosProvider.html
│ │ │ │ └── DixieSimpleLogger.html
│ │ │ ├── Protocols/
│ │ │ │ └── DixiePuppetMaking.html
│ │ │ ├── css/
│ │ │ │ ├── styles.css
│ │ │ │ └── stylesPrint.css
│ │ │ ├── hierarchy.html
│ │ │ └── index.html
│ │ ├── Nodes.xml
│ │ ├── Tokens1.xml
│ │ ├── Tokens10.xml
│ │ ├── Tokens11.xml
│ │ ├── Tokens12.xml
│ │ ├── Tokens13.xml
│ │ ├── Tokens14.xml
│ │ ├── Tokens15.xml
│ │ ├── Tokens16.xml
│ │ ├── Tokens17.xml
│ │ ├── Tokens18.xml
│ │ ├── Tokens19.xml
│ │ ├── Tokens2.xml
│ │ ├── Tokens20.xml
│ │ ├── Tokens21.xml
│ │ ├── Tokens22.xml
│ │ ├── Tokens23.xml
│ │ ├── Tokens24.xml
│ │ ├── Tokens25.xml
│ │ ├── Tokens3.xml
│ │ ├── Tokens4.xml
│ │ ├── Tokens5.xml
│ │ ├── Tokens6.xml
│ │ ├── Tokens7.xml
│ │ ├── Tokens8.xml
│ │ ├── Tokens9.xml
│ │ ├── docSet.dsidx
│ │ ├── docSet.dsidx-shm
│ │ ├── docSet.dsidx-wal
│ │ ├── docSet.mom
│ │ ├── docSet.skidx
│ │ ├── docSet.toc
│ │ └── docSet.tokencache
│ ├── docset-installed.txt
│ └── html/
│ ├── Blocks/
│ │ ├── DixieCustomChaosBlock.html
│ │ └── DixieImplementationBlock.html
│ ├── Categories/
│ │ └── NSObject+DixieRunTimeHelper.html
│ ├── Classes/
│ │ ├── Dixie.html
│ │ ├── DixieBaseChaosProvider.html
│ │ ├── DixieBaseParamProvider.html
│ │ ├── DixieBlockChaosProvider.html
│ │ ├── DixieCallEnvironment.html
│ │ ├── DixieChaosContext.html
│ │ ├── DixieCompositeChaosProvider.html
│ │ ├── DixieCompositeCondition.html
│ │ ├── DixieConstantChaosProvider.html
│ │ ├── DixieDefaultPuppetMaker.html
│ │ ├── DixieExceptionChaosProvider.html
│ │ ├── DixieLogger.html
│ │ ├── DixieMethodInfo.html
│ │ ├── DixieNilChaosProvider.html
│ │ ├── DixieNonChaosProvider.html
│ │ ├── DixieProfileEntry.html
│ │ ├── DixieRandomChaosProvider.html
│ │ ├── DixieRandomParamProvider.html
│ │ ├── DixieRunTimeHelper.html
│ │ ├── DixieSequentialChaosProvider.html
│ │ └── DixieSimpleLogger.html
│ ├── Protocols/
│ │ └── DixiePuppetMaking.html
│ ├── css/
│ │ ├── styles.css
│ │ └── stylesPrint.css
│ ├── hierarchy.html
│ └── index.html
├── LICENSE
├── README.md
├── deploy_docs.sh
└── documentation.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
#
Pods/
DixieExampleApp/Pods/
================================================
FILE: .travis.yml
================================================
language: objective-c
script:
- xctool -project Dixie/Dixie.xcodeproj -scheme Dixie -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool test -project Dixie/Dixie.xcodeproj -scheme DixieTests -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Dixie
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request.
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible.
## Pull requests
Before creating a pull request please make sure the following steps are completed:
* Make sure to update to the latest version of the master branch and branch out from that to avoid conflicts.
* Check that both the Dixie and DixieTests schemes compile successfully.
* Check that the unit tests included in the DixieTests scheme all execute successfully.
* Check that all use cases in the sample project using the modified version of Dixie are still functioning correctly.
* In the case of a new feature all the relevant use cases are covered with new unit tests.
* In the case of a bug fix a new unit test covers the use case, which should execute successfully with the fix in place.
* New files contain the common license header (please see below).
* New classes and methods contain enough documentation to understand their purpose.
* Please make sure the pull request contains a meaningful description explaining the problem the change solves and how the solution works.
* Please also check that the created pull request's state is green after the validation is completed by Travis CI.
## Issues
If you find a bug in the project (and you don’t know how to fix it), have trouble following the documentation or have a question about the project, then please create an issue! Some tips [from the GitHub Guide](https://guides.github.com/activities/contributing-to-open-source/):
* Please check existing issues for the problem you're seeing. Duplicating an issue is slower for both parties so search through open and closed issues to see if what you’re running in to has been addressed already.
* Be clear about what your problem is: what was the expected outcome, what happened instead? Detail how someone else can recreate the problem.
* Include system details like the browser, library or operating system you’re using and its version.
* Paste error output or logs in your issue or in a Gist. If pasting them in the issue, wrap it in three backticks: ``` so that it renders nicely.
## Contact
In case of major changes please feel free to reach out to the maintainers of the project at any time, so we can figure out the best approach together:
* Peter Wiesner (peter.wiesner@skyscanner.net, @WiesnerPeti)
* Zsolt Varnai (zsolt.varnai@skyscanner.net, @zsoltvarnai)
* Csaba Szabo (csaba.szabo@skyscanner.net, @CsabaSzabo)
* Zsombor Fuszenecker (zsombor.fuszenecker@skyscanner.net, @zsbee)
## License
By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/Skyscanner/Dixie/blob/master/LICENSE
All files are released with the Apache 2.0 license.
If you are adding a new file it should have a header like this:
```
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
```
================================================
FILE: Dixie/Dixie/ChaosProvider/BlockChaosProvider/DixieBlockChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
/**
* Block type, that can describe a method implementation
*
* @param chaosProvider The DixieBaseChaosProvider, who is calling this block (to avoid retain cycles)
* @param victim The class or instance of the class, that's method chould be changed
* @param environment A DixieCallEnvironment, that describes the arguments and return value
*/
typedef void(^DixieCustomChaosBlock)(DixieBaseChaosProvider* chaosProvider,id victim, DixieCallEnvironment* environment);
/**
* Provides a behaviour, where the original method's implementation can be replaced by a custom block
*/
@interface DixieBlockChaosProvider : DixieBaseChaosProvider
/**
* Creates an instance of DixieBlockChaosProvider
*
* @param block The block, that should be called as the method's implementation
*
* @return a new instance of DixieBlockChaosProvider
*/
+(instancetype) block:(DixieCustomChaosBlock)block;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/BlockChaosProvider/DixieBlockChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBlockChaosProvider.h"
@interface DixieBlockChaosProvider (/*Private*/)
@property (nonatomic, copy) DixieCustomChaosBlock block;
@end
@implementation DixieBlockChaosProvider
+(instancetype) block:(DixieCustomChaosBlock)block;
{
DixieBlockChaosProvider* provider = [DixieBlockChaosProvider new];
provider.block = block;
return provider;
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
self.block(self,victim, environment);
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
#import "DixieCompositeCondition.h"
/**
* Provides a behaviour, where the method's implementation can be changed according the passed arguments
*/
@interface DixieCompositeChaosProvider : DixieBaseChaosProvider
/**
* Creates a new instance of DixieCompositeChaosProvider
*
* @param arrayOfConditions an array of DixieCompositeConditions
*
* @return a new instance of DixieCompositeChaosProvider
*/
+(instancetype) conditions:(NSArray*)arrayOfConditions;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieCompositeChaosProvider.h"
#import "DixieNonChaosProvider.h"
@interface DixieCompositeChaosProvider (/*Private*/)
@property (nonatomic, strong) NSArray* conditions;
@end
@implementation DixieCompositeChaosProvider
+(instancetype) conditions:(NSArray*)arrayOfConditions
{
DixieCompositeChaosProvider* provider = [DixieCompositeChaosProvider new];
provider.conditions = arrayOfConditions;
return provider;
}
-(void) setContext:(DixieChaosContext *)context
{
[super setContext:context];
for (DixieCompositeCondition* condition in self.conditions) {
[condition.chaosProvider setContext:context];
}
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
for (DixieCompositeCondition* condition in self.conditions) {
id param = environment.arguments[condition.index];
if ([param isEqual:condition.value])
{
[self forwardChaosOf:victim environment:environment to:condition.chaosProvider];
return;
}
}
//No condition matched any arguments, so fallback to the original implementation
[self forwardChaosOf:victim environment:environment to:[DixieNonChaosProvider new]];
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeCondition.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixieBaseChaosProvider.h"
/**
* Describes which chaosProvider should define the method's behaviour if the argument at index, matches the given value. DixieCompositeChaosProvider uses this object to delegate the implementation to different providers.
*/
@interface DixieCompositeCondition : NSObject
/**
* The index of the argument to check
*/
@property (readonly) NSInteger index;
/**
* The value of the argument we wish to compare
*/
@property (readonly) id value;
/**
* The ChaosProvider to apply
*/
@property (readonly) DixieBaseChaosProvider* chaosProvider;
/**
* Creates a DixieCompositeCondition
*
* @param index The index of the argument to check
* @param value The value to compare the argument against
* @param chaosProvider The DixieChaosProvider to apply, if the argument matches the value
*
* @return a DixieCompositeCondition
*/
+(instancetype) condition:(NSInteger)index value:(id)value chaosProvider:(DixieBaseChaosProvider*)chaosProvider;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeCondition.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieCompositeCondition.h"
@interface DixieCompositeCondition(/*Private*/)
@property NSInteger index;
@property id value;
@property DixieBaseChaosProvider* chaosProvider;
@end
@implementation DixieCompositeCondition
+(instancetype) condition:(NSInteger)index value:(id)value chaosProvider:(DixieBaseChaosProvider*)chaosProvider
{
DixieCompositeCondition* condition = [DixieCompositeCondition new];
condition.index = index;
condition.value = value;
condition.chaosProvider = chaosProvider;
return condition;
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/ConstantChaosProvider/DixieConstantChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
/**
* Provides a behaviour, where a given constant will be returned from the method's implementation
*/
@interface DixieConstantChaosProvider : DixieBaseChaosProvider
/**
* The constant value to return
*/
@property (readonly) id constant;
/**
* Creates a DixieConstantChaosProvider
*
* @param constant The value the DixieConstantChaosProvider will return
*
* @return a DixieConstantChaosProvider
*/
+(instancetype) constant:(id)constant;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/ConstantChaosProvider/DixieConstantChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieConstantChaosProvider.h"
#import "NSObject+DixieRunTimeHelper.h"
@interface DixieConstantChaosProvider()
@property (nonatomic, strong) id constant;
@end
@implementation DixieConstantChaosProvider
+(instancetype) constant:(id)constant
{
DixieConstantChaosProvider* provider = [DixieConstantChaosProvider new];
provider.constant = constant;
return provider;
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
if(isType(self.context.methodInfo.signature.methodReturnType, void) == NO)
{
if(isType(self.context.methodInfo.signature.methodReturnType, id) ||
strcmp(self.context.methodInfo.signature.methodReturnType, "@?") == 0)
{
environment.returnValue = (__bridge void *)(self.constant);
}
else{
environment.returnValue = [(NSObject *)self.constant originalValue];
}
}
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/DixieBaseChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixieChaosContext.h"
#import "DixieRunTimeHelper.h"
@interface DixieBaseChaosProvider : NSObject
@property (nonatomic, strong) DixieChaosContext* context;
/**
* Returns a new behaviour implementation
*
* @return An implementation pointer
*/
-(IMP) chaos;
/**
* Will forward the result of one DixieChaosProvider to the next.
*
* @param victim The class or instance of the class, that's method should be changed
* @param environment A DixieCallEnvironment, that describes the arguments and return value
* @param chaosProvider The target DixieBaseChaosProvider, who should provider the behaviour
*/
-(void) forwardChaosOf:(id)victim environment:(DixieCallEnvironment*)environment to:(DixieBaseChaosProvider*)chaosProvider;
/**
* The behaviour implementation
*
* @param victim The class or instance of the class, that's method should be changed
* @param environment A DixieCallEnvironment, that describes the arguments and return value
*/
-(void) chaosImplementationFor:(id) victim environment:(DixieCallEnvironment*)environment;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/DixieBaseChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
#import "DixieLogger.h"
@implementation DixieBaseChaosProvider
-(IMP) chaos
{
return [DixieRunTimeHelper implementationWithChaosContext:self.context
environment:^(id victim, DixieCallEnvironment *environment) {
[self chaosImplementationFor:victim environment:environment];
if(isType(self.context.methodInfo.signature.methodReturnType, id))
{
[[DixieLogger defaultLogger] log:@"Puppet %@: %@ used %@ to return %@",
NSStringFromClass([victim class]),
NSStringFromSelector(self.context.methodInfo.selector),
[self class],
environment.returnValue];
}
}];
}
-(void) forwardChaosOf:(id)victim environment:(DixieCallEnvironment*)environment to:(DixieBaseChaosProvider*)chaosProvider
{
[chaosProvider setContext:self.context];
IMP chaosIMP = [chaosProvider chaos];
SEL selector;
if (chaosIMP == self.context.originalIMP)
{
selector = NSSelectorFromString([DixieMethodPrefix stringByAppendingString:NSStringFromSelector(self.context.methodInfo.selector)]);
}
else
{
selector = self.context.methodInfo.selector;
}
[DixieRunTimeHelper callImplementation:chaosIMP on:victim chaosContext:self.context environment:environment];
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
@throw [NSException exceptionWithName:@"Method not overriden"
reason:@"DixieBaseChaosProvider subclasses should override [BaseChaosProvider chaosImpl:]"
userInfo:nil];
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/DixieChaosContext.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixieMethodInfo.h"
/**
* Defining the context for the DixieChaosProviders
*/
@interface DixieChaosContext : NSObject
/**
* A seed for deterministic behaviour.
*/
@property (readonly) NSInteger seed;
/**
* A DixieMethodInfo, that describes the class and one of its method
*/
@property (readonly) DixieMethodInfo* methodInfo;
/**
* The original implementation of the class method, described in the methodInfo property.
*/
@property IMP originalIMP;
/**
* Creates a DixieChaosContext with a given seed and methodInfo
*
* @param seed A seed for deterministic behaviour.
* @param methodInfo A DixieMethodInfo, that describes the class and one of its method
*
* @return A DixieChaosContext
*/
-(instancetype) init:(NSInteger)seed methodInfo:(DixieMethodInfo*)methodInfo;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/DixieChaosContext.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieChaosContext.h"
@interface DixieChaosContext(/*Private*/)
@property NSInteger seed;
@property (nonatomic, strong) DixieMethodInfo* methodInfo;
@end
@implementation DixieChaosContext
-(instancetype) init:(NSInteger)seed methodInfo:(DixieMethodInfo*)methodInfo
{
if (self = [super init])
{
self.seed = seed;
self.methodInfo = methodInfo;
}
return self;
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/ExceptionChaosProvider/DixieExceptionChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
/**
* Provides a behaviour, where the method's implementation will always crash on calling
*/
@interface DixieExceptionChaosProvider : DixieBaseChaosProvider
/**
* The exception to raise
*/
@property (readonly) NSException* exception;
/**
* Creates an DixieExceptionChaosProvider
*
* @param exception The exception to raise
*
* @return an DixieExceptionChaosProvider
*/
+(instancetype) exception:(NSException*)exception;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/ExceptionChaosProvider/DixieExceptionChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieExceptionChaosProvider.h"
@interface DixieExceptionChaosProvider()
@property (nonatomic, strong) NSException* exception;
@end
@implementation DixieExceptionChaosProvider
+(instancetype) exception:(NSException*)exception
{
DixieExceptionChaosProvider* provider = [DixieExceptionChaosProvider new];
provider.exception = exception;
return provider;
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
[_exception raise];
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/NilChaosProvider/DixieNilChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
/**
* Provides a behaviour, where the method's implementation always returns nil;
*/
@interface DixieNilChaosProvider : DixieBaseChaosProvider
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/NilChaosProvider/DixieNilChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieNilChaosProvider.h"
@implementation DixieNilChaosProvider
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
environment.returnValue = nil;
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/NonChaosProvider/DixieNonChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
/**
* Provides the original behaviour
*/
@interface DixieNonChaosProvider : DixieBaseChaosProvider
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/NonChaosProvider/DixieNonChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieNonChaosProvider.h"
@implementation DixieNonChaosProvider
-(IMP) chaos
{
return self.context.originalIMP;
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
[DixieRunTimeHelper callImplementation:self.context.originalIMP on:victim chaosContext:self.context environment:environment];
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/RandomChaosProvider/DixieRandomChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
#import "DixieRandomParamProvider.h"
/**
* Provides a behaviour, where the method's implementation returns a random object, generated with a DixieRandomParamProvider
*/
@interface DixieRandomChaosProvider : DixieBaseChaosProvider
/**
* Creates a DixieRandomChaosProvider
*
* @param paramProvider The DixieRandomParamProvider to use as the random object generator
*
* @return a DixieRandomChaosProvider
*/
+(instancetype) randomProvider:(DixieRandomParamProvider*)paramProvider;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/RandomChaosProvider/DixieRandomChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieRandomChaosProvider.h"
@interface DixieRandomChaosProvider (/*Private*/)
@property (nonatomic, strong) DixieRandomParamProvider* paramProvider;
@end
@implementation DixieRandomChaosProvider
+(instancetype) randomProvider:(DixieRandomParamProvider*)paramProvider
{
DixieRandomChaosProvider* provider = [DixieRandomChaosProvider new];
provider.paramProvider = paramProvider;
return provider;
}
-(void) setContext:(DixieChaosContext *)context
{
[super setContext:context];
[self.paramProvider setSeed:context.seed];
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
environment.returnValue = (__bridge void *)([self.paramProvider parameter]);
}
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/SequentialChaosProvider/DixieSequentialChaosProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseChaosProvider.h"
/**
* Provides a behaviour, where the method's implementation behaves differently for a new call. The different behaviours depend on the defined different DixieChaosProviders of the class
*/
@interface DixieSequentialChaosProvider : DixieBaseChaosProvider
/**
* Creates a DixieSequentialChaosProvider
*
* @param sequenceOfChaosProviders Array of DixieBaseChaosProvider, the order of the array defines, how the method's implementation will behave for a new call.
*
* @return a DixieSequentialChaosProvider
*/
+(instancetype) sequence:(NSArray*)sequenceOfChaosProviders;
@end
================================================
FILE: Dixie/Dixie/ChaosProvider/SequentialChaosProvider/DixieSequentialChaosProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieSequentialChaosProvider.h"
#import "DixieNonChaosProvider.h"
@interface DixieSequentialChaosProvider (/*Private*/)
@property (nonatomic) NSInteger callCount;
@property (nonatomic, strong) NSArray* sequence;
@end
@implementation DixieSequentialChaosProvider
-(id) init
{
if (self = [super init])
{
self.callCount = 0;
self.sequence = @[];
}
return self;
}
+(instancetype) sequence:(NSArray*)sequenceOfChaosProviders
{
DixieSequentialChaosProvider* provider = [DixieSequentialChaosProvider new];
provider.sequence = sequenceOfChaosProviders;
return provider;
}
-(void) setContext:(DixieChaosContext *)context
{
[super setContext:context];
for (DixieBaseChaosProvider* provider in self.sequence) {
[provider setContext:context];
}
}
-(void) chaosImplementationFor:(id)victim environment:(DixieCallEnvironment *)environment
{
DixieBaseChaosProvider* current;
//If we are not out of bounds, then use chaos provider mathcing the call count
if (self.callCount < self.sequence.count)
{
current = self.sequence[self.callCount];
}
//Else use always the last one
else
{
current = [self.sequence lastObject];
}
//Only increamenet callcount if its less than NSIntegerMax so prevent overflows
if (self.callCount < NSIntegerMax)
{
self.callCount++;
}
//If the current is a BaseChaosProvider, then forward the chaos to it
if ([current isKindOfClass:[DixieBaseChaosProvider class]])
{
[self forwardChaosOf:victim environment:environment to:current];
}
//If it is of different class, do nothing
else
{
[self forwardChaosOf:victim environment:environment to:[DixieNonChaosProvider new]];
}
}
@end
================================================
FILE: Dixie/Dixie/Dixie+Fluent/Dixie+Fluent.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "Dixie.h"
/**
* Fluent API of Dixie for easier configuration
* @code [Dixie new].Profile(aProfile).Apply();
*/
@interface Dixie (Fluent)
@property (nonatomic, readonly) Dixie*(^PuppetMaker)(id<DixiePuppetMaking> puppetMaker);
@property (nonatomic, readonly) Dixie*(^Profile)(DixieProfileEntry* profile);
@property (nonatomic, readonly) Dixie*(^Profiles)(NSArray* arrayOfEntries);
@property (nonatomic, readonly) void(^Apply)();
@property (nonatomic, readonly) void(^ApplyWith)(NSInteger seed);
@property (nonatomic, readonly) void(^Revert)();
@property (nonatomic, readonly) void(^RevertIt)(DixieProfileEntry* entry);
@end
================================================
FILE: Dixie/Dixie/Dixie+Fluent/Dixie+Fluent.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "Dixie+Fluent.h"
@implementation Dixie (Fluent)
-(Dixie*(^)(id<DixiePuppetMaking>)) PuppetMaker
{
return ^Dixie*(id<DixiePuppetMaking> puppetMaker)
{
return [self puppetMaker:puppetMaker];
};
}
-(Dixie*(^)(DixieProfileEntry*)) Profile
{
return ^Dixie*(DixieProfileEntry* profile)
{
return [self profile:profile];
};
}
-(Dixie*(^)(NSArray*)) Profiles
{
return ^Dixie*(NSArray* arrayOfEntries)
{
return [self profiles:arrayOfEntries];
};
}
-(void(^)()) Apply
{
return ^void(){
[self apply];
};
}
-(void(^)(NSInteger)) ApplyWith
{
return ^void(NSInteger seed){
[self apply:seed];
};
}
-(void(^)()) Revert
{
return ^void(){
[self revert];
};
}
-(void(^)(DixieProfileEntry* entry)) RevertIt
{
return ^void(DixieProfileEntry* entry){
[self revert:entry];
};
}
@end
================================================
FILE: Dixie/Dixie/Dixie.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixiePuppetMaking.h"
#import "DixieProfileEntry.h"
/**
* Represents a Dixie configuration.
*/
@interface Dixie : NSObject
/**
* Sets the default puppetmaker
*
* @param puppetMaker An object that conforms to the PuppetMaking protocol.
*
* @return The active Dixie object
*/
-(instancetype) puppetMaker:(id<DixiePuppetMaking>)puppetMaker;
/**
* Registers a single profiles.
*
* @param profile A DixieProfileEntry objects.
*
* @return Same Dixie object.
*/
-(instancetype) profile:(DixieProfileEntry*)profile;
/**
* Registers profiles.
*
* @param arrayOfEntries Collection of DixieProfileEntry objects.
*
* @return Same Dixie object.
*/
-(instancetype) profiles:(NSArray*)arrayOfEntries;
/**
* Applies the Dixie configuration.
*/
-(void) apply;
/**
* Applies the Dixie configuration with the specified seed (used for random generation).
*
* @param seed The seed for random generation
*/
-(void) apply:(NSInteger)seed;
/**
* Reverts the Dixie configuration.
*/
-(void) revert;
/**
* Reverts one DixieProfileEntry from the Dixie configuration.
*
* @param entry The profile to revert
*/
-(void) revert:(DixieProfileEntry*)entry;
@end
================================================
FILE: Dixie/Dixie/Dixie.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "Dixie.h"
#import "DixieDefaultPuppetMaker.h"
#import "DixieLogger.h"
@interface Dixie(/*Private*/)
@property (atomic) NSLock* lock;
@property (nonatomic, strong) NSMutableArray* profiles;
@property (nonatomic, strong) id<DixiePuppetMaking> puppetMaker;
@end
@implementation Dixie
-(id) init
{
if (self = [super init])
{
self.lock = [NSLock new];
self.profiles = [@[] mutableCopy];
self.puppetMaker = [DixieDefaultPuppetMaker new];
}
return self;
}
-(instancetype) puppetMaker:(id<DixiePuppetMaking>)puppetMaker
{
[self.lock lock];
self.puppetMaker = puppetMaker;
[self.lock unlock];
return self;
}
-(instancetype) profile:(DixieProfileEntry*)profile
{
NSAssert(profile != nil, @"DixieProfileEntry should not be nil");
return [self profiles:@[ profile ]];
}
-(instancetype) profiles:(NSArray*)arrayOfEntries
{
[self.lock lock];
[self.profiles addObjectsFromArray:arrayOfEntries];
[self.lock unlock];
return self;
}
-(void) apply
{
[self apply:0];
}
-(void) apply:(NSInteger)seed
{
[self.lock lock];
for (DixieProfileEntry* entry in self.profiles) {
[self.puppetMaker createPuppet:entry seed:seed];
}
[self.lock unlock];
}
-(void) revert
{
for (DixieProfileEntry* entry in self.profiles.copy) {
[self revert:entry];
}
}
-(void) revert:(DixieProfileEntry*)entry
{
[self.lock lock];
[self.puppetMaker dismissPuppet:entry];
[self.profiles removeObject:entry];
[self.lock unlock];
}
@end
================================================
FILE: Dixie/Dixie/DixieHeaders.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "Dixie.h"
#import "Dixie+Fluent.h"
#import "DixieProfileEntry.h"
#import "DixieBaseChaosProvider.h"
#import "DixieNilChaosProvider.h"
#import "DixieNonChaosProvider.h"
#import "DixieConstantChaosProvider.h"
#import "DixieCompositeChaosProvider.h"
#import "DixieBlockChaosProvider.h"
#import "DixieRandomChaosProvider.h"
#import "DixieExceptionChaosProvider.h"
#import "DixieSequentialChaosProvider.h"
================================================
FILE: Dixie/Dixie/DixieLogger/DixieLogger.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
/**
* Base class for logging
*/
@interface DixieLogger : NSObject
/**
* Returns default logger.
*
* @return The logger.
*/
+ (instancetype)defaultLogger;
/**
* Changes the default logger.
*
* @param logger The logger.
*/
+ (void) setDefaultLogger:(DixieLogger*)logger;
/**
* Logs a message.
*
* @param format The format of the message. It can be followed by variadic arguments.
*/
- (void)log:(NSString*)format,...;
@end
================================================
FILE: Dixie/Dixie/DixieLogger/DixieLogger.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#include "DixieLogger.h"
#include "DixieSimpleLogger.h"
@implementation DixieLogger
static DixieLogger* _logger;
+ (instancetype)defaultLogger
{
return _logger;
}
+ (void) setDefaultLogger:(DixieLogger*)logger
{
if (logger == nil)
@throw [NSException exceptionWithName:@"ArgumentNil" reason:@"logger is nil" userInfo: nil];
_logger = logger;
}
+(void) load
{
[super load];
_logger = [DixieSimpleLogger new];
}
- (void)log:(NSString*)format,...
{
@throw [NSException exceptionWithName:@"Method not overriden" reason:@"DixLogger subclasses should override [DixLogger log:]" userInfo: nil];
}
@end
================================================
FILE: Dixie/Dixie/DixieLogger/SimpleLogger/DixieSimpleLogger.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixieLogger.h"
/**
* Default subclass of DixieLogger,that uses NSLog
*/
@interface DixieSimpleLogger : DixieLogger
@end
================================================
FILE: Dixie/Dixie/DixieLogger/SimpleLogger/DixieSimpleLogger.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#include "DixieSimpleLogger.h"
@implementation DixieSimpleLogger
- (void)log:(NSString*)format,...
{
va_list argumentList;
va_start(argumentList, format);
NSMutableString * message = [[NSMutableString alloc] initWithFormat:format arguments:argumentList];
NSMutableString * res = [[NSMutableString alloc] initWithString:@"Dixie "];
[res appendString:message];
NSLog(res, nil);
va_end(argumentList);
}
@end
================================================
FILE: Dixie/Dixie/MethodInfo/DixieMethodInfo.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
/**
* Describes a class and one of its method
*/
@interface DixieMethodInfo : NSObject
/**
* Owner of the method.
*/
@property (readonly) Class targetClass;
/**
* Selector of the method.
*/
@property (readonly) SEL selector;
/**
* The string representation of the method encoding
*/
@property (readonly) const char* methodTypeEncoding;
/**
* Indicates whether the method is a class method.
*/
@property (readonly) BOOL isClassMethod;
/**
* Signature of the method.
*/
@property (readonly) NSMethodSignature* signature;
/**
* Creates a new MethodInfo instance.
*
* @param targetClass The owner of the method.
* @param selector The selector of the method.
*
* @return A MethodInfo instance.
*/
+(instancetype) infoWithClass:(Class)targetClass selector:(SEL)selector;
@end
================================================
FILE: Dixie/Dixie/MethodInfo/DixieMethodInfo.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieMethodInfo.h"
#import "DixieRunTimeHelper.h"
@interface DixieMethodInfo()
@property Class targetClass;
@property SEL selector;
@property BOOL isClassMethod;
@property (nonatomic, strong) NSMethodSignature* signature;
@property const char* methodTypeEncoding;
@end
@implementation DixieMethodInfo
+(instancetype) infoWithClass:(Class)targetClass selector:(SEL)selector;
{
DixieMethodInfo* method = [DixieMethodInfo new];
method.targetClass = targetClass;
method.selector = selector;
method.isClassMethod = [targetClass respondsToSelector:selector];
if (method.isClassMethod)
{
method.signature = [targetClass methodSignatureForSelector:selector];
}
else
{
method.signature = [targetClass instanceMethodSignatureForSelector:selector];
}
method.methodTypeEncoding = [DixieRunTimeHelper methodTypeEncodingForMethodInfo:method];
return method;
}
@end
================================================
FILE: Dixie/Dixie/ParamProvider/DixieBaseParamProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
/**
* Base class for objects, that can return an object
*/
@interface DixieBaseParamProvider : NSObject
/**
* Returns an object
*
* @return an object
*/
-(id) parameter;
@end
================================================
FILE: Dixie/Dixie/ParamProvider/DixieBaseParamProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseParamProvider.h"
@implementation DixieBaseParamProvider
-(id) parameter;
{
@throw [NSException exceptionWithName:@"Method not overriden"
reason:@"BaseParamProvider subclasses should override [BaseParamProvider aParameter]"
userInfo:nil];
}
@end
================================================
FILE: Dixie/Dixie/ParamProvider/RandomParamProvider/DixieRandomParamProvider.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieBaseParamProvider.h"
/**
* Provides a random number object
*/
@interface DixieRandomParamProvider : DixieBaseParamProvider
/**
* Creates a DixieRandomParamProvider with a given uppper bound
*
* @param upperBound The upper limit to the random numbers, the numbers can be only lower than this
*
* @return a DixieRandomParamProvider
*/
+(instancetype) providerWithUpperBound:(unsigned int)upperBound;
/**
* Set the seed for the random generator
*
* @param seed A seed for deterministic behaviour
*/
-(void) setSeed:(unsigned long long)seed;
@end
================================================
FILE: Dixie/Dixie/ParamProvider/RandomParamProvider/DixieRandomParamProvider.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
/*
A C-program for MT19937-64 (2004/9/29 version).
Coded by Takuji Nishimura and Makoto Matsumoto.
This is a 64-bit version of Mersenne Twister pseudorandom number
generator.
Before using, initialize the state by using init_genrand64(seed)
or init_by_array64(init_key, key_length).
Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of its contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
References:
T. Nishimura, ``Tables of 64-bit Mersenne Twisters''
ACM Transactions on Modeling and
Computer Simulation 10. (2000) 348--357.
M. Matsumoto and T. Nishimura,
``Mersenne Twister: a 623-dimensionally equidistributed
uniform pseudorandom number generator''
ACM Transactions on Modeling and
Computer Simulation 8. (Jan. 1998) 3--30.
Any feedback is very welcome.
http://www.math.hiroshima-u.ac.jp/~m-mat/MT/emt.html
email: m-mat @ math.sci.hiroshima-u.ac.jp (remove spaces)
*/
#import "DixieRandomParamProvider.h"
#define NN 312
#define MM 156
#define MATRIX_A 0xB5026F5AA96619E9ULL
#define UM 0xFFFFFFFF80000000ULL /* Most significant 33 bits */
#define LM 0x7FFFFFFFULL /* Least significant 31 bits */
@interface DixieRandomParamProvider()
{
/* The array for the state vector */
unsigned long long _mt[NN];
int _mti;
unsigned int _upperBound;
}
@end
@implementation DixieRandomParamProvider
+(instancetype) providerWithUpperBound:(unsigned int)upperBound
{
DixieRandomParamProvider* paramProvider = [DixieRandomParamProvider new];
paramProvider->_upperBound = upperBound;
return paramProvider;
}
-(instancetype) init
{
self = [super init];
if(self)
{
/* mti==NN+1 means mt[NN] is not initialized */
_mti = NN+1;
_upperBound = 100;
[self setSeed:[[NSDate date] timeIntervalSince1970]];
}
return self;
}
-(void) setSeed:(unsigned long long)seed
{
_mt[0] = seed;
for (_mti=1; _mti<NN; _mti++)
_mt[_mti] = (6364136223846793005ULL * (_mt[_mti-1] ^ (_mt[_mti-1] >> 62)) + _mti);
}
-(id) parameter
{
return @((unsigned int)([self generateRealNumber] * _upperBound));
}
/* generates a random number on [0,1]-real-interval */
-(double) generateRealNumber
{
return ([self generateRandomUnsignedLongLong] >> 11) * (1.0/9007199254740991.0);
}
-(unsigned long long) generateRandomUnsignedLongLong
{
int i;
unsigned long long x;
static unsigned long long mag01[2]={0ULL, MATRIX_A};
if (_mti >= NN) { /* generate NN words at one time */
/* if init_genrand64() has not been called, */
/* a default initial seed is used */
if (_mti == NN+1)
[self setSeed:5489ULL];
for (i=0;i<NN-MM;i++) {
x = (_mt[i]&UM)|(_mt[i+1]&LM);
_mt[i] = _mt[i+MM] ^ (x>>1) ^ mag01[(int)(x&1ULL)];
}
for (;i<NN-1;i++) {
x = (_mt[i]&UM)|(_mt[i+1]&LM);
_mt[i] = _mt[i+(MM-NN)] ^ (x>>1) ^ mag01[(int)(x&1ULL)];
}
x = (_mt[NN-1]&UM)|(_mt[0]&LM);
_mt[NN-1] = _mt[MM-1] ^ (x>>1) ^ mag01[(int)(x&1ULL)];
_mti = 0;
}
x = _mt[_mti++];
x ^= (x >> 29) & 0x5555555555555555ULL;
x ^= (x << 17) & 0x71D67FFFEDA60000ULL;
x ^= (x << 37) & 0xFFF7EEE000000000ULL;
x ^= (x >> 43);
return x;
}
@end
================================================
FILE: Dixie/Dixie/ProfileEntry/DixieProfileEntry.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixieBaseChaosProvider.h"
#import "DixieMethodInfo.h"
/**
* Describe the target class, selector and the desired behaviour
*/
@interface DixieProfileEntry : NSObject
/**
* Uniquely identifies the entry
*/
@property (readonly) NSString* entryID;
/**
* The DixieMethodInfo object, that describes the class and its method
*/
@property (nonatomic, readonly) DixieMethodInfo* methodInfo;
/**
* The ChaosProvider which will provide the new implementation
*/
@property (nonatomic, strong) DixieBaseChaosProvider* chaosProvider;
/**
* Creates a DixieProfileEntry with the main properties set
*
* @param victim The victim whose method we wish to override
* @param selector The selector for the method we wish to override
* @param chaosProvider The ChaosProvider which will provide the new implementation
*
* @return a new DixieProfileEntry with the properties set
*/
+(instancetype) entry:(Class)victim selector:(SEL)selector chaosProvider:(DixieBaseChaosProvider*)chaosProvider;
/**
* Creates an array of DixieProfileEntry.
* The DixieProfileEntry array consists of all selectors on the victim EXCEPT those defined in the klass
*
* @param victim The victim whose method we wish to override
* @param klass Tha class, whose selectors should not be added to the list of entries
* @param chaosProvider The ChaosProvider which will provide the new implementation
*
* @return an array of DixieProfileEntries representing all available selectors on the victim EXCEPT those defined in the excludeClass
*/
+(NSArray*) entries:(Class)victim excludeSelectorsOfClass:(Class)excludeClass chaosProvider:(DixieBaseChaosProvider *)chaosProvider;
/**
* Creates an array of DixieProfileEntries
* The DixieProfileEntries array consists of all selectors on the victim EXCEPT those specified in excludedSelectorNames
*
* @param victim The victim whose method we wish to override
* @param excludedSelectorNames The selectors we do NOT wish to include in the return calue
* @param chaosProvider The ChaosProvider which will provide the new implementation
*
* @return an array of DixieProfileEntries representing all available selectors on the victim EXCEPT those specified
*/
+(NSArray*) entries:(Class)victim excludes:(NSArray*)excludedSelectorNames chaosProvider:(DixieBaseChaosProvider*)chaosProvider;
@end
================================================
FILE: Dixie/Dixie/ProfileEntry/DixieProfileEntry.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieProfileEntry.h"
#import "DixieRunTimeHelper.h"
@interface DixieProfileEntry(/*Private*/)
@property (nonatomic, strong) NSString* entryID;
@property (nonatomic, strong) DixieMethodInfo* methodInfo;
@end
@implementation DixieProfileEntry
-(instancetype) init
{
if (self = [super init])
{
self.entryID = [[NSUUID UUID] UUIDString];
}
return self;
}
+(instancetype) entry:(Class)victim selector:(SEL)selector chaosProvider:(DixieBaseChaosProvider*)chaosProvider
{
DixieProfileEntry* entry = [DixieProfileEntry new];
entry.methodInfo = [DixieMethodInfo infoWithClass:victim selector:selector];
entry.chaosProvider = chaosProvider;
entry.entryID = [NSString stringWithFormat:@"%@%@", NSStringFromClass(victim), NSStringFromSelector(selector)];
return entry;
}
+(NSArray*) entries:(Class)victim excludeSelectorsOfClass:(Class)excludeClass chaosProvider:(DixieBaseChaosProvider *)chaosProvider
{
NSArray* selectorsToExclude = [DixieRunTimeHelper selectorsForClass:excludeClass];
return [self entries:victim excludes:selectorsToExclude chaosProvider:chaosProvider];
}
+(NSArray*) entries:(Class)victim excludes:(NSArray*)excludedSelectorNames chaosProvider:(DixieBaseChaosProvider*)chaosProvider
{
NSArray* selectorNames = [DixieRunTimeHelper selectorsForClass:victim];
NSMutableArray* profileEntries = [@[] mutableCopy];
for (NSString* selectorName in selectorNames) {
if (![excludedSelectorNames containsObject:selectorName])
{
DixieProfileEntry* entry = [DixieProfileEntry entry:victim selector:NSSelectorFromString(selectorName) chaosProvider:chaosProvider];
if (entry)
{
[profileEntries addObject:entry];
}
}
}
return profileEntries;
}
@end
================================================
FILE: Dixie/Dixie/PuppetMaker/DixieDefaultPuppetMaker.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixiePuppetMaking.h"
/**
* Default implementation of the DixiePuppetMaking interface
*/
@interface DixieDefaultPuppetMaker : NSObject <DixiePuppetMaking>
@end
================================================
FILE: Dixie/Dixie/PuppetMaker/DixieDefaultPuppetMaker.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieDefaultPuppetMaker.h"
#import <objc/runtime.h>
@interface DixieDefaultPuppetMaker(/*Private*/)
@property (nonatomic, strong) NSMutableDictionary* victims;
@end
@implementation DixieDefaultPuppetMaker
-(instancetype) init
{
if (self = [super init])
{
self.victims = [@{} mutableCopy];
}
return self;
}
-(void) createPuppet:(DixieProfileEntry*)entry seed:(NSInteger)seed
{
//If already a puppet, dismiss it
if (self.victims[entry.entryID])
{
[self dismissPuppet:entry];
}
DixieMethodInfo* methodInfo = entry.methodInfo;
//Get the victim class (class or meta class)
Class victim = [DixieRunTimeHelper classForMethodInfo:methodInfo];
//Create the context for the behaviour replacement
DixieChaosContext* context = [[DixieChaosContext alloc] init:seed methodInfo:methodInfo];
[entry.chaosProvider setContext:context];
context.originalIMP = method_getImplementation([DixieRunTimeHelper methodForMethodInfo:methodInfo]);
//Retrieve the new behaviour from the provider
IMP chaos = [entry.chaosProvider chaos];
//Add the original implementation to the class with a new selector, dixie_[originalSelectorName]
class_addMethod(victim,
NSSelectorFromString([DixieMethodPrefix stringByAppendingString:NSStringFromSelector(methodInfo.selector)]),
context.originalIMP,
methodInfo.methodTypeEncoding);
//Replace the original behaviour with the new one
class_replaceMethod(victim, methodInfo.selector, chaos, methodInfo.methodTypeEncoding);
//Store original implementation
self.victims[entry.entryID] = [NSValue valueWithPointer:context.originalIMP];
}
-(void) dismissPuppet:(DixieProfileEntry*)entry
{
DixieMethodInfo* methodInfo = entry.methodInfo;
NSValue* value = self.victims[entry.entryID];
if (!value)
return;
//Retrieve original implementation
IMP originalIMP = [value pointerValue];
Class victim = [DixieRunTimeHelper classForMethodInfo:methodInfo];
//Put back original implementation
class_replaceMethod(victim, methodInfo.selector, originalIMP, methodInfo.methodTypeEncoding);
//No need to store it
[self.victims removeObjectForKey:entry.entryID];
}
@end
================================================
FILE: Dixie/Dixie/PuppetMaker/DixiePuppetMaking.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixieProfileEntry.h"
/**
* Interface to objects, that can change the behaviour of a class' method.
*/
@protocol DixiePuppetMaking <NSObject>
/**
* Creates puppet according to a given entry for the specified seed, by replacing the original behaviour with a new
*
* @param entry The entry specifying the victim class, selector and behaviour
* @param seed An integer value to make the invocations on the puppets deterministic
*/
-(void) createPuppet:(DixieProfileEntry*)entry seed:(NSInteger)seed;
/**
* Dismisses the puppets for a given entry
*
* @param entry The entry specifying the victim class, selector and behaviour
*/
-(void) dismissPuppet:(DixieProfileEntry*)entry;
@end
================================================
FILE: Dixie/Dixie/Runtime/DixieCallEnvironment.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import <Foundation/Foundation.h>
/**
* Describes the environment of a method's implementation
*/
@interface DixieCallEnvironment : NSObject
/**
* Arguments of the method call converted into objects
*/
@property (strong) NSArray* arguments;
/**
* The return value of a method's implementation
*/
@property (nonatomic) void *returnValue;
/**
* Creates a DixieCallEnvironment with the arguments
*
* @param arguments Arguments of the method call converted into objects
*
* @return a DixieCallEnvironment
*/
-(instancetype) initWithArguments:(NSArray*)arguments;
@end
================================================
FILE: Dixie/Dixie/Runtime/DixieCallEnvironment.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieCallEnvironment.h"
@implementation DixieCallEnvironment
-(instancetype) initWithArguments:(NSArray*)arguments
{
if (self = [super init])
{
self.arguments = arguments;
}
return self;
}
@end
================================================
FILE: Dixie/Dixie/Runtime/DixieRunTimeHelper.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import <objc/runtime.h>
#import "DixieCallEnvironment.h"
#import "DixieChaosContext.h"
#import "DixieMethodInfo.h"
#define DixieMethodPrefix @"dixie_"
#define isType(typeEncoding, type2) (strcmp(typeEncoding, @encode(type2)) == 0)
/**
* Block type to describe a method's concrete implementation
*
* @param victim The receiver of the ObjC message
* @param environment The environment of the call
*/
typedef void(^DixieImplementationBlock)(id victim, DixieCallEnvironment* environment);
/**
* Helper to generate behaviour implementation, transparently call implementations and provide Runtime informations
*/
@interface DixieRunTimeHelper : NSObject
/**
* Generates an implementation pointer that confirms to the chaosContext and block
*
* @param chaosContext The context of the implementation
* @param block Block for the body of the implementation pointer
*
* @return the implementation pointer
*/
+(IMP) implementationWithChaosContext:(DixieChaosContext*)chaosContext environment:(DixieImplementationBlock)block;
/**
* Calls the implementation pointer
*
* @param implementation The IMP pointer to call
* @param puppet The receiver of the ObjC message
* @param chaosContext The context of the behaviour
* @param environment The environment of the method's implementation call
*/
+(void) callImplementation:(IMP)implementation on:(id)puppet chaosContext:(DixieChaosContext*)chaosContext environment:(DixieCallEnvironment*)environment;
/**
* Collects the runtime public methodnames for a given class
*
* @param targetClass The class
*
* @return Array of public selector strings
*/
+(NSArray*) selectorsForClass:(Class)targetClass;
/**
* Returns the Method pointer for a given MethodInfo object
*
* @param methodInfo Describes the target class and it's method
*
* @return The Method pointer
*/
+(Method) methodForMethodInfo:(DixieMethodInfo*)methodInfo;
/**
* Returns the string representation of the method encoding describes by the MethodInfo object
*
* @param methodInfo Describes the target class and it's method
*
* @return the string representation of the method encoding
*/
+(const char*) methodTypeEncodingForMethodInfo:(DixieMethodInfo*)methodInfo;
/**
* Returns the class for the method described in the MethodInfo.
*
* @param methodInfo Describes the target class and it's method
*
* @return A Class object for instance methods and meta class object for class methods
*/
+(Class) classForMethodInfo:(DixieMethodInfo*)methodInfo;
@end
================================================
FILE: Dixie/Dixie/Runtime/DixieRunTimeHelper.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieRunTimeHelper.h"
#import "NSObject+DixieRunTimeHelper.h"
@interface NSInvocation (PrivateHack)
- (void)invokeUsingIMP: (IMP)imp;
@end
struct BlockDescriptor {
unsigned long reserved;
unsigned long size;
void *rest[1];
};
struct Block {
void *isa;
int flags;
int reserved;
void *invoke;
struct BlockDescriptor *descriptor;
};
@implementation DixieRunTimeHelper
#pragma mark - IMPLEMENTATION HELPERS
+(IMP) implementationWithChaosContext:(DixieChaosContext*)chaosContext environment:(DixieImplementationBlock)block;
{
struct Block *blockWrapper = (__bridge void*)[self blockForSignature:chaosContext.methodInfo.signature block:block];
struct BlockDescriptor *descriptor = blockWrapper->descriptor;
int copyDisposeFlag = 1 << 25;
int signatureFlag = 1 << 30;
assert(blockWrapper->flags & signatureFlag);
int index = 0;
if(blockWrapper->flags & copyDisposeFlag)
index += 2;
//Make the block fit for any need
descriptor->rest[index] = (void*)chaosContext.methodInfo.methodTypeEncoding;
return imp_implementationWithBlock((__bridge id)(blockWrapper));
}
/**
* Returns a block implementation for a given signature
*
* @param signature The method signature
* @param block The body of the block implementation
*
* @return A block, that matches the signature and calls the block
*/
+(id) blockForSignature:(NSMethodSignature*)signature block:(DixieImplementationBlock)block
{
#define BLOCK_ID \
^id(id victim, ...){ \
va_list args; \
va_start(args, victim); \
\
NSArray* arguments = [self argumentsFor:signature originalArguments:args]; \
DixieCallEnvironment* environment = [[DixieCallEnvironment alloc] initWithArguments:arguments]; \
block(victim, environment); \
return environment.returnValue; \
}
#define BLOCK(TYPE) \
^TYPE(id victim, ...){ \
va_list args; \
va_start(args, victim); \
\
NSArray* arguments = [self argumentsFor:signature originalArguments:args]; \
DixieCallEnvironment* environment = [[DixieCallEnvironment alloc] initWithArguments:arguments]; \
block(victim, environment); \
return *(TYPE *)environment.returnValue; \
}
const char* rType = signature.methodReturnType;
if (isType(rType, void)) return BLOCK(void);
if (isType(rType, BOOL)) return BLOCK(BOOL);
if (isType(rType, int)) return BLOCK(int);
if (isType(rType, char)) return BLOCK(char);
if (isType(rType, double)) return BLOCK(double);
if (isType(rType, float)) return BLOCK(float);
if (isType(rType, long)) return BLOCK(long);
if (isType(rType, short)) return BLOCK(short);
if (isType(rType, unsigned int)) return BLOCK(unsigned int);
return BLOCK_ID;
}
/**
* Parses a variadic list into array of objects
@note The current solution handles only object,selector,BOOL and char types.
*
* @param signature The signature to determine the type of parameters in the variadic list
* @param arguments The variadic list
*
* @return Array of parsed objects
*/
+(NSArray*) argumentsFor:(NSMethodSignature*)signature originalArguments:(va_list)arguments
{
//Ignore self and _cmd
NSInteger numberOfParameters = signature.numberOfArguments-2;
NSMutableArray* parameters = [NSMutableArray arrayWithCapacity:numberOfParameters];
va_list iteratorList;
__va_copy(iteratorList, arguments);
for (NSInteger index = 0; index < numberOfParameters; index++) {
//Only read argument after self and _cmd
const char* argTyp = [signature getArgumentTypeAtIndex:index + 2];
//Convert to object
id parameter = [self objectFromNext:iteratorList type:argTyp outputArgumentList:&iteratorList];
//Fill the unparsed value with NSNull
parameter = parameter ? :[NSNull null];
[parameters addObject:parameter];
}
return parameters;
}
+(void) callImplementation:(IMP)implementation on:(id)puppet chaosContext:(DixieChaosContext*)chaosContext environment:(DixieCallEnvironment*)environment
{
NSMethodSignature* signature = chaosContext.methodInfo.signature;
NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:signature];
[invocation setTarget:puppet];
[invocation setSelector:chaosContext.methodInfo.selector];
//We are ignoring the index of self and _cmd
for (NSInteger i = 2; i < signature.numberOfArguments; i++) {
const char* encoding = [signature getArgumentTypeAtIndex:i];
if (isType(encoding, NSObject*) ||
isType(encoding, void*) ||
strcmp(encoding, "@?") == 0 )
{
id value = environment.arguments[i-2];
if (value == [NSNull null]) {
value = nil;
}
[invocation setArgument:&value atIndex:i];
}
else
{
void* value = [environment.arguments[i-2] originalValue];
[invocation setArgument:value atIndex:i];
}
}
[invocation invokeUsingIMP:implementation];
if (!isType(chaosContext.methodInfo.signature.methodReturnType, void))
{
if(isType(chaosContext.methodInfo.signature.methodReturnType, id))
{
id returnValue;
[invocation getReturnValue:&returnValue];
environment.returnValue = (void*)CFBridgingRetain(returnValue);
}
else
{
void *returnValue = malloc(chaosContext.methodInfo.signature.methodReturnLength);
environment.returnValue = returnValue;
}
}
}
#pragma mark - CONVERT OBJECT
/**
* Converts the next item in the variadic arguments list into subclass of NSObjects
* @note We are using core foundation factories here, NSNumber, NSString might be swizzled
*
* @param arguments The variadic list
* @param argType The expected type of the next item
* @param ova_List The current state of the variadic list after the current value is read from it
*
* @return An NSObject subclass that represents the argument
*/
+(NSObject *) objectFromNext:(va_list)arguments type:(const char*)argType outputArgumentList:(out void *)ova_List
{
NSObject* object;
//char
//int
//short
//unsgined char
//unsgined short
//BOOL
if (isType(argType, char) ||
isType(argType, int) ||
isType(argType, short) ||
isType(argType, unsigned char) ||
isType(argType, unsigned short) ||
isType(argType, BOOL))
{
int i = va_arg(arguments, int);
object = CFBridgingRelease(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &i));
storeOriginal(object, int, i);
}
//long
else if (isType(argType, long))
{
long l = va_arg(arguments, long);
object = CFBridgingRelease(CFNumberCreate(kCFAllocatorDefault, kCFNumberLongType, &l));
object.originalValue = &l;
}
//long long
else if (isType(argType, long long))
{
long long ll = va_arg(arguments, long long);
object = CFBridgingRelease(CFNumberCreate(kCFAllocatorDefault, kCFNumberLongLongType, &ll));
object.originalValue = ≪
}
//unsgined int
else if (isType(argType, unsigned int))
{
unsigned int ui = va_arg(arguments, unsigned int);
object = CFBridgingRelease(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &ui));
storeOriginal(object, unsigned int, ui);
}
//unsgined long
else if (isType(argType, unsigned long))
{
unsigned long ul = va_arg(arguments, unsigned long);
object = CFBridgingRelease(CFNumberCreate(kCFAllocatorDefault, kCFNumberLongType, &ul));
storeOriginal(object, unsigned long, ul);
}
//unsgined long long
else if (isType(argType, unsigned long long))
{
unsigned long long ull = va_arg(arguments, unsigned long long);
object = CFBridgingRelease(CFNumberCreate(kCFAllocatorDefault, kCFNumberLongLongType, &ull));
storeOriginal(object, unsigned long long, ull);
}
//float
//double
else if (isType(argType, float) || isType(argType, double) )
{
double real = va_arg(arguments, double);
object = CFBridgingRelease(CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &real));
storeOriginal(object, double, real);
}
//char string
else if (isType(argType, char*))
{
char* string = va_arg(arguments, char*);
object = CFBridgingRelease(CFStringCreateWithCString(NULL, string, kCFStringEncodingUTF8));
object.originalValue = string;
}
//Object
else if (strcmp(argType, "@") == 0 ||//NSObject
strcmp(argType, "no@") == 0 || //NSObject?
strcmp(argType, "@?") == 0 //Block
)
{
id data = va_arg(arguments, id);
object = strcmp(argType, "@?") == 0 ? [data copy] : data;
}
//class
else if (isType(argType, Class))
{
Class klass = va_arg(arguments, Class);
object = NSStringFromClass(klass);
storeOriginal(object, Class, klass);
}
//SEL
else if (isType(argType, SEL))
{
SEL selector = va_arg(arguments, SEL);
object = NSStringFromSelector(selector);
storeOriginal(object, SEL, selector);
}
//Output pointer
else if (argType[0] == '^')
{
void* outputParam = va_arg(arguments, void*);
object = [NSValue valueWithPointer:outputParam];
}
//Set the original encoding on the object
[object setEncoding:[NSString stringWithUTF8String:argType]];
ova_List = &arguments;
return object;
}
#pragma mark - INFO HELPER
+(NSArray*) selectorsForClass:(Class)targetClass
{
unsigned int count;
Method* methods = class_copyMethodList(targetClass, &count);
NSMutableArray* selectorNames = [@[] mutableCopy];
for (NSInteger i = 0; i < count; i++) {
Method method = methods[i];
SEL selector = method_getName(method);
NSString* selectorName = NSStringFromSelector(selector);
if (selectorName)
{
[selectorNames addObject:selectorName];
}
}
free(methods);
return selectorNames;
}
+(Method) methodForMethodInfo:(DixieMethodInfo*)methodInfo
{
if (methodInfo.isClassMethod)
{
return class_getClassMethod(methodInfo.targetClass, methodInfo.selector);
}
else
{
return class_getInstanceMethod(methodInfo.targetClass, methodInfo.selector);
}
}
+(const char*) methodTypeEncodingForMethodInfo:(DixieMethodInfo*)methodInfo
{
Method method = [self methodForMethodInfo:methodInfo];
return method_getTypeEncoding(method);
}
+(Class) classForMethodInfo:(DixieMethodInfo*)methodInfo
{
if (methodInfo.isClassMethod)
{
return object_getClass((id)methodInfo.targetClass);
}
else
{
return methodInfo.targetClass;
}
}
@end
================================================
FILE: Dixie/Dixie/Runtime/NSObject+DixieRunTimeHelper.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#define storeOriginal(object , type, original) \
({ \
object.originalValue = (void*)malloc(sizeof(type)); \
((type*)object.originalValue)[0] = original; \
}) \
/**
* Helper category on NSObject to store the original type encoding and value if the object was converted from non-object type
*/
@interface NSObject (DixieRunTimeHelper)
@property (nonatomic, strong) NSString* encoding;
@property void* originalValue;
@end
================================================
FILE: Dixie/Dixie/Runtime/NSObject+DixieRunTimeHelper.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "NSObject+DixieRunTimeHelper.h"
#import <objc/runtime.h>
#import "DixieRunTimeHelper.h"
static char encodingKey;
static char originalValueKey;
@interface NSObject ()
@property (nonatomic, strong) NSValue* wrapper;
@end
@implementation NSObject (encoding)
#pragma mark - Encoding
-(void) setEncoding:(NSString*)encoding
{
objc_setAssociatedObject(self, &encodingKey, encoding, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
-(NSString*) encoding
{
return objc_getAssociatedObject(self, &encodingKey);
}
#pragma mark - Original value
-(void) setOriginalValue:(void *)originalValue
{
NSValue* value = [NSValue valueWithPointer:originalValue];
objc_setAssociatedObject(self, &originalValueKey, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
-(void*) originalValue
{
NSValue* value = objc_getAssociatedObject(self, &originalValueKey);
return [value pointerValue];
}
#pragma mark - Dealloc
//Do not forget to dealloc the original value
+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class class = [self class];
SEL originalSelector = NSSelectorFromString(@"dealloc");
SEL swizzledSelector = NSSelectorFromString([DixieMethodPrefix stringByAppendingString:@"dealloc"]);
Method originalMethod = class_getInstanceMethod(class, originalSelector);
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
BOOL didAddMethod =
class_addMethod(class,
originalSelector,
method_getImplementation(swizzledMethod),
method_getTypeEncoding(swizzledMethod));
if (didAddMethod) {
class_replaceMethod(class,
swizzledSelector,
method_getImplementation(originalMethod),
method_getTypeEncoding(originalMethod));
} else {
method_exchangeImplementations(originalMethod, swizzledMethod);
}
});
}
- (void)dixie_dealloc{
[self dixie_dealloc];
void* original = self.originalValue;
if (original)
{
free(original);
}
}
@end
================================================
FILE: Dixie/Dixie.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
F53EBAC21A1007AF004FAC40 /* RunTimeHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F53EBAC11A1007AF004FAC40 /* RunTimeHelperTests.m */; };
F54F5AA819E83346002EFAEA /* DixieBaseChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A4E19E83346002EFAEA /* DixieBaseChaosProvider.m */; };
F54F5AA919E83346002EFAEA /* DixieBaseChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A4E19E83346002EFAEA /* DixieBaseChaosProvider.m */; };
F54F5AAA19E83346002EFAEA /* DixieBlockChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5119E83346002EFAEA /* DixieBlockChaosProvider.m */; };
F54F5AAB19E83346002EFAEA /* DixieBlockChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5119E83346002EFAEA /* DixieBlockChaosProvider.m */; };
F54F5AAC19E83346002EFAEA /* DixieChaosContext.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5319E83346002EFAEA /* DixieChaosContext.m */; };
F54F5AAD19E83346002EFAEA /* DixieChaosContext.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5319E83346002EFAEA /* DixieChaosContext.m */; };
F54F5AAE19E83346002EFAEA /* DixieCompositeChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5619E83346002EFAEA /* DixieCompositeChaosProvider.m */; };
F54F5AAF19E83346002EFAEA /* DixieCompositeChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5619E83346002EFAEA /* DixieCompositeChaosProvider.m */; };
F54F5AB019E83346002EFAEA /* DixieCompositeCondition.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5819E83346002EFAEA /* DixieCompositeCondition.m */; };
F54F5AB119E83346002EFAEA /* DixieCompositeCondition.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5819E83346002EFAEA /* DixieCompositeCondition.m */; };
F54F5AB219E83346002EFAEA /* DixieConstantChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5B19E83346002EFAEA /* DixieConstantChaosProvider.m */; };
F54F5AB319E83346002EFAEA /* DixieConstantChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5B19E83346002EFAEA /* DixieConstantChaosProvider.m */; };
F54F5AB419E83346002EFAEA /* DixieExceptionChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5E19E83346002EFAEA /* DixieExceptionChaosProvider.m */; };
F54F5AB519E83346002EFAEA /* DixieExceptionChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A5E19E83346002EFAEA /* DixieExceptionChaosProvider.m */; };
F54F5AB619E83346002EFAEA /* DixieNilChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6119E83346002EFAEA /* DixieNilChaosProvider.m */; };
F54F5AB719E83346002EFAEA /* DixieNilChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6119E83346002EFAEA /* DixieNilChaosProvider.m */; };
F54F5AB819E83346002EFAEA /* DixieNonChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6419E83346002EFAEA /* DixieNonChaosProvider.m */; };
F54F5AB919E83346002EFAEA /* DixieNonChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6419E83346002EFAEA /* DixieNonChaosProvider.m */; };
F54F5ABC19E83346002EFAEA /* DixieSequentialChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6A19E83346002EFAEA /* DixieSequentialChaosProvider.m */; };
F54F5ABD19E83346002EFAEA /* DixieSequentialChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6A19E83346002EFAEA /* DixieSequentialChaosProvider.m */; };
F54F5ABE19E83346002EFAEA /* Dixie+Fluent.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6D19E83346002EFAEA /* Dixie+Fluent.m */; };
F54F5ABF19E83346002EFAEA /* Dixie+Fluent.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6D19E83346002EFAEA /* Dixie+Fluent.m */; };
F54F5AC019E83346002EFAEA /* Dixie.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6F19E83346002EFAEA /* Dixie.m */; };
F54F5AC119E83346002EFAEA /* Dixie.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A6F19E83346002EFAEA /* Dixie.m */; };
F54F5AC219E83346002EFAEA /* DixieLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A7319E83346002EFAEA /* DixieLogger.m */; };
F54F5AC319E83346002EFAEA /* DixieLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A7319E83346002EFAEA /* DixieLogger.m */; };
F54F5AC419E83346002EFAEA /* DixieSimpleLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A7619E83346002EFAEA /* DixieSimpleLogger.m */; };
F54F5AC519E83346002EFAEA /* DixieSimpleLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A7619E83346002EFAEA /* DixieSimpleLogger.m */; };
F54F5AD019E83346002EFAEA /* DixieMethodInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A8719E83346002EFAEA /* DixieMethodInfo.m */; };
F54F5AD119E83346002EFAEA /* DixieMethodInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5A8719E83346002EFAEA /* DixieMethodInfo.m */; };
F54F5AE419E83346002EFAEA /* DixieProfileEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5AA319E83346002EFAEA /* DixieProfileEntry.m */; };
F54F5AE519E83346002EFAEA /* DixieProfileEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5AA319E83346002EFAEA /* DixieProfileEntry.m */; };
F54F5AE619E83346002EFAEA /* DixieDefaultPuppetMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5AA619E83346002EFAEA /* DixieDefaultPuppetMaker.m */; };
F54F5AE719E83346002EFAEA /* DixieDefaultPuppetMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5AA619E83346002EFAEA /* DixieDefaultPuppetMaker.m */; };
F54F5B1119E835B7002EFAEA /* TestPuppetMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5B0719E835B7002EFAEA /* TestPuppetMaker.m */; };
F54F5B1319E835B7002EFAEA /* DixieAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5B0A19E835B7002EFAEA /* DixieAPITests.m */; };
F54F5B1419E835B7002EFAEA /* DixieChaosProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5B0B19E835B7002EFAEA /* DixieChaosProviderTests.m */; };
F54F5B1719E835B7002EFAEA /* ProfileEntryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F54F5B0E19E835B7002EFAEA /* ProfileEntryTests.m */; };
F5529F9F1AFD3C52002D2004 /* DixieRandomParamProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529F9E1AFD3C52002D2004 /* DixieRandomParamProvider.m */; };
F5529FA01AFD3C52002D2004 /* DixieRandomParamProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529F9E1AFD3C52002D2004 /* DixieRandomParamProvider.m */; };
F5529FA31AFD3C96002D2004 /* DixieBaseParamProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FA21AFD3C96002D2004 /* DixieBaseParamProvider.m */; };
F5529FA41AFD3C96002D2004 /* DixieBaseParamProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FA21AFD3C96002D2004 /* DixieBaseParamProvider.m */; };
F5529FA91AFD3E12002D2004 /* TestClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FA61AFD3E12002D2004 /* TestClass.m */; };
F5529FAA1AFD3E12002D2004 /* SubTestClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FA81AFD3E12002D2004 /* SubTestClass.m */; };
F5529FC51AFD4A82002D2004 /* DixieCallEnvironment.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FBA1AFD4A82002D2004 /* DixieCallEnvironment.m */; };
F5529FC61AFD4A82002D2004 /* DixieCallEnvironment.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FBA1AFD4A82002D2004 /* DixieCallEnvironment.m */; };
F5529FCB1AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FC01AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m */; };
F5529FCC1AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FC01AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m */; };
F5529FCD1AFD4A82002D2004 /* DixieRunTimeHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FC21AFD4A82002D2004 /* DixieRunTimeHelper.m */; };
F5529FCE1AFD4A82002D2004 /* DixieRunTimeHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FC21AFD4A82002D2004 /* DixieRunTimeHelper.m */; };
F5529FD81B010F0A002D2004 /* NSDateProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FD31B010F0A002D2004 /* NSDateProfile.m */; };
F5529FDA1B010F0A002D2004 /* NSURLProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = F5529FD71B010F0A002D2004 /* NSURLProfile.m */; };
F56C7E191A5EFBFD004B946F /* DixieRandomChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F56C7E181A5EFBFD004B946F /* DixieRandomChaosProvider.m */; };
F56C7E1A1A5EFBFD004B946F /* DixieRandomChaosProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = F56C7E181A5EFBFD004B946F /* DixieRandomChaosProvider.m */; };
F573658A1A2A737200D684CE /* ChaosProviderTestClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F57365891A2A737200D684CE /* ChaosProviderTestClass.m */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
F5965A4219C0796C00ED0A6A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
F53EBAC11A1007AF004FAC40 /* RunTimeHelperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RunTimeHelperTests.m; sourceTree = "<group>"; };
F54F5A4D19E83346002EFAEA /* DixieBaseChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieBaseChaosProvider.h; sourceTree = "<group>"; };
F54F5A4E19E83346002EFAEA /* DixieBaseChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieBaseChaosProvider.m; sourceTree = "<group>"; };
F54F5A5019E83346002EFAEA /* DixieBlockChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieBlockChaosProvider.h; sourceTree = "<group>"; };
F54F5A5119E83346002EFAEA /* DixieBlockChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieBlockChaosProvider.m; sourceTree = "<group>"; };
F54F5A5219E83346002EFAEA /* DixieChaosContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieChaosContext.h; sourceTree = "<group>"; };
F54F5A5319E83346002EFAEA /* DixieChaosContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieChaosContext.m; sourceTree = "<group>"; };
F54F5A5519E83346002EFAEA /* DixieCompositeChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieCompositeChaosProvider.h; sourceTree = "<group>"; };
F54F5A5619E83346002EFAEA /* DixieCompositeChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieCompositeChaosProvider.m; sourceTree = "<group>"; };
F54F5A5719E83346002EFAEA /* DixieCompositeCondition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieCompositeCondition.h; sourceTree = "<group>"; };
F54F5A5819E83346002EFAEA /* DixieCompositeCondition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieCompositeCondition.m; sourceTree = "<group>"; };
F54F5A5A19E83346002EFAEA /* DixieConstantChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieConstantChaosProvider.h; sourceTree = "<group>"; };
F54F5A5B19E83346002EFAEA /* DixieConstantChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieConstantChaosProvider.m; sourceTree = "<group>"; };
F54F5A5D19E83346002EFAEA /* DixieExceptionChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieExceptionChaosProvider.h; sourceTree = "<group>"; };
F54F5A5E19E83346002EFAEA /* DixieExceptionChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieExceptionChaosProvider.m; sourceTree = "<group>"; };
F54F5A6019E83346002EFAEA /* DixieNilChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieNilChaosProvider.h; sourceTree = "<group>"; };
F54F5A6119E83346002EFAEA /* DixieNilChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieNilChaosProvider.m; sourceTree = "<group>"; };
F54F5A6319E83346002EFAEA /* DixieNonChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieNonChaosProvider.h; sourceTree = "<group>"; };
F54F5A6419E83346002EFAEA /* DixieNonChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieNonChaosProvider.m; sourceTree = "<group>"; };
F54F5A6919E83346002EFAEA /* DixieSequentialChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieSequentialChaosProvider.h; sourceTree = "<group>"; };
F54F5A6A19E83346002EFAEA /* DixieSequentialChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieSequentialChaosProvider.m; sourceTree = "<group>"; };
F54F5A6C19E83346002EFAEA /* Dixie+Fluent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Dixie+Fluent.h"; sourceTree = "<group>"; };
F54F5A6D19E83346002EFAEA /* Dixie+Fluent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Dixie+Fluent.m"; sourceTree = "<group>"; };
F54F5A6E19E83346002EFAEA /* Dixie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dixie.h; sourceTree = "<group>"; };
F54F5A6F19E83346002EFAEA /* Dixie.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Dixie.m; sourceTree = "<group>"; };
F54F5A7019E83346002EFAEA /* DixieHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieHeaders.h; sourceTree = "<group>"; };
F54F5A7219E83346002EFAEA /* DixieLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieLogger.h; sourceTree = "<group>"; };
F54F5A7319E83346002EFAEA /* DixieLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieLogger.m; sourceTree = "<group>"; };
F54F5A7519E83346002EFAEA /* DixieSimpleLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieSimpleLogger.h; sourceTree = "<group>"; };
F54F5A7619E83346002EFAEA /* DixieSimpleLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieSimpleLogger.m; sourceTree = "<group>"; };
F54F5A8619E83346002EFAEA /* DixieMethodInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieMethodInfo.h; sourceTree = "<group>"; };
F54F5A8719E83346002EFAEA /* DixieMethodInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieMethodInfo.m; sourceTree = "<group>"; };
F54F5AA219E83346002EFAEA /* DixieProfileEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieProfileEntry.h; sourceTree = "<group>"; };
F54F5AA319E83346002EFAEA /* DixieProfileEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieProfileEntry.m; sourceTree = "<group>"; };
F54F5AA519E83346002EFAEA /* DixieDefaultPuppetMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieDefaultPuppetMaker.h; sourceTree = "<group>"; };
F54F5AA619E83346002EFAEA /* DixieDefaultPuppetMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieDefaultPuppetMaker.m; sourceTree = "<group>"; };
F54F5AA719E83346002EFAEA /* DixiePuppetMaking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixiePuppetMaking.h; sourceTree = "<group>"; };
F54F5B0619E835B7002EFAEA /* TestPuppetMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestPuppetMaker.h; sourceTree = "<group>"; };
F54F5B0719E835B7002EFAEA /* TestPuppetMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestPuppetMaker.m; sourceTree = "<group>"; };
F54F5B0819E835B7002EFAEA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F54F5B0A19E835B7002EFAEA /* DixieAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieAPITests.m; sourceTree = "<group>"; };
F54F5B0B19E835B7002EFAEA /* DixieChaosProviderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieChaosProviderTests.m; sourceTree = "<group>"; };
F54F5B0E19E835B7002EFAEA /* ProfileEntryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProfileEntryTests.m; sourceTree = "<group>"; };
F5529F9D1AFD3C52002D2004 /* DixieRandomParamProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieRandomParamProvider.h; sourceTree = "<group>"; };
F5529F9E1AFD3C52002D2004 /* DixieRandomParamProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieRandomParamProvider.m; sourceTree = "<group>"; };
F5529FA11AFD3C96002D2004 /* DixieBaseParamProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieBaseParamProvider.h; sourceTree = "<group>"; };
F5529FA21AFD3C96002D2004 /* DixieBaseParamProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieBaseParamProvider.m; sourceTree = "<group>"; };
F5529FA51AFD3E12002D2004 /* TestClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestClass.h; sourceTree = "<group>"; };
F5529FA61AFD3E12002D2004 /* TestClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestClass.m; sourceTree = "<group>"; };
F5529FA71AFD3E12002D2004 /* SubTestClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubTestClass.h; sourceTree = "<group>"; };
F5529FA81AFD3E12002D2004 /* SubTestClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SubTestClass.m; sourceTree = "<group>"; };
F5529FB91AFD4A82002D2004 /* DixieCallEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieCallEnvironment.h; sourceTree = "<group>"; };
F5529FBA1AFD4A82002D2004 /* DixieCallEnvironment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieCallEnvironment.m; sourceTree = "<group>"; };
F5529FBF1AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+DixieRunTimeHelper.h"; sourceTree = "<group>"; };
F5529FC01AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+DixieRunTimeHelper.m"; sourceTree = "<group>"; };
F5529FC11AFD4A82002D2004 /* DixieRunTimeHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieRunTimeHelper.h; sourceTree = "<group>"; };
F5529FC21AFD4A82002D2004 /* DixieRunTimeHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieRunTimeHelper.m; sourceTree = "<group>"; };
F5529FD21B010F0A002D2004 /* NSDateProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDateProfile.h; sourceTree = "<group>"; };
F5529FD31B010F0A002D2004 /* NSDateProfile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDateProfile.m; sourceTree = "<group>"; };
F5529FD61B010F0A002D2004 /* NSURLProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSURLProfile.h; sourceTree = "<group>"; };
F5529FD71B010F0A002D2004 /* NSURLProfile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLProfile.m; sourceTree = "<group>"; };
F552A0411B01CDB8002D2004 /* RandomParamProviderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RandomParamProviderTests.m; sourceTree = "<group>"; };
F56C7E171A5EFBFD004B946F /* DixieRandomChaosProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DixieRandomChaosProvider.h; sourceTree = "<group>"; };
F56C7E181A5EFBFD004B946F /* DixieRandomChaosProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DixieRandomChaosProvider.m; sourceTree = "<group>"; };
F57365881A2A737200D684CE /* ChaosProviderTestClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChaosProviderTestClass.h; sourceTree = "<group>"; };
F57365891A2A737200D684CE /* ChaosProviderTestClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChaosProviderTestClass.m; sourceTree = "<group>"; };
F5965A4419C0796C00ED0A6A /* libDixie.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libDixie.a; sourceTree = BUILT_PRODUCTS_DIR; };
F5965A4F19C0796C00ED0A6A /* DixieTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DixieTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
F5965A4119C0796C00ED0A6A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F5965A4C19C0796C00ED0A6A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
F54F5A4B19E83346002EFAEA /* Dixie */ = {
isa = PBXGroup;
children = (
F54F5A7019E83346002EFAEA /* DixieHeaders.h */,
F54F5A6E19E83346002EFAEA /* Dixie.h */,
F54F5A6F19E83346002EFAEA /* Dixie.m */,
F54F5A6B19E83346002EFAEA /* Dixie+Fluent */,
F54F5AA419E83346002EFAEA /* PuppetMaker */,
F54F5A9A19E83346002EFAEA /* ProfileEntry */,
F54F5A8519E83346002EFAEA /* MethodInfo */,
F54F5A4C19E83346002EFAEA /* ChaosProvider */,
F5529F9B1AFD3C52002D2004 /* ParamProvider */,
F54F5A7119E83346002EFAEA /* DixieLogger */,
F5529FB81AFD4A82002D2004 /* Runtime */,
);
path = Dixie;
sourceTree = "<group>";
};
F54F5A4C19E83346002EFAEA /* ChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A5219E83346002EFAEA /* DixieChaosContext.h */,
F54F5A5319E83346002EFAEA /* DixieChaosContext.m */,
F54F5A4D19E83346002EFAEA /* DixieBaseChaosProvider.h */,
F54F5A4E19E83346002EFAEA /* DixieBaseChaosProvider.m */,
F54F5A4F19E83346002EFAEA /* BlockChaosProvider */,
F54F5A5419E83346002EFAEA /* CompositeChaosProvider */,
F54F5A5919E83346002EFAEA /* ConstantChaosProvider */,
F54F5A5C19E83346002EFAEA /* ExceptionChaosProvider */,
F54F5A5F19E83346002EFAEA /* NilChaosProvider */,
F54F5A6219E83346002EFAEA /* NonChaosProvider */,
F56C7E161A5EFBFD004B946F /* RandomChaosProvider */,
F54F5A6819E83346002EFAEA /* SequentialChaosProvider */,
);
path = ChaosProvider;
sourceTree = "<group>";
};
F54F5A4F19E83346002EFAEA /* BlockChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A5019E83346002EFAEA /* DixieBlockChaosProvider.h */,
F54F5A5119E83346002EFAEA /* DixieBlockChaosProvider.m */,
);
path = BlockChaosProvider;
sourceTree = "<group>";
};
F54F5A5419E83346002EFAEA /* CompositeChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A5719E83346002EFAEA /* DixieCompositeCondition.h */,
F54F5A5819E83346002EFAEA /* DixieCompositeCondition.m */,
F54F5A5519E83346002EFAEA /* DixieCompositeChaosProvider.h */,
F54F5A5619E83346002EFAEA /* DixieCompositeChaosProvider.m */,
);
path = CompositeChaosProvider;
sourceTree = "<group>";
};
F54F5A5919E83346002EFAEA /* ConstantChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A5A19E83346002EFAEA /* DixieConstantChaosProvider.h */,
F54F5A5B19E83346002EFAEA /* DixieConstantChaosProvider.m */,
);
path = ConstantChaosProvider;
sourceTree = "<group>";
};
F54F5A5C19E83346002EFAEA /* ExceptionChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A5D19E83346002EFAEA /* DixieExceptionChaosProvider.h */,
F54F5A5E19E83346002EFAEA /* DixieExceptionChaosProvider.m */,
);
path = ExceptionChaosProvider;
sourceTree = "<group>";
};
F54F5A5F19E83346002EFAEA /* NilChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A6019E83346002EFAEA /* DixieNilChaosProvider.h */,
F54F5A6119E83346002EFAEA /* DixieNilChaosProvider.m */,
);
path = NilChaosProvider;
sourceTree = "<group>";
};
F54F5A6219E83346002EFAEA /* NonChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A6319E83346002EFAEA /* DixieNonChaosProvider.h */,
F54F5A6419E83346002EFAEA /* DixieNonChaosProvider.m */,
);
path = NonChaosProvider;
sourceTree = "<group>";
};
F54F5A6819E83346002EFAEA /* SequentialChaosProvider */ = {
isa = PBXGroup;
children = (
F54F5A6919E83346002EFAEA /* DixieSequentialChaosProvider.h */,
F54F5A6A19E83346002EFAEA /* DixieSequentialChaosProvider.m */,
);
path = SequentialChaosProvider;
sourceTree = "<group>";
};
F54F5A6B19E83346002EFAEA /* Dixie+Fluent */ = {
isa = PBXGroup;
children = (
F54F5A6C19E83346002EFAEA /* Dixie+Fluent.h */,
F54F5A6D19E83346002EFAEA /* Dixie+Fluent.m */,
);
path = "Dixie+Fluent";
sourceTree = "<group>";
};
F54F5A7119E83346002EFAEA /* DixieLogger */ = {
isa = PBXGroup;
children = (
F54F5A7219E83346002EFAEA /* DixieLogger.h */,
F54F5A7319E83346002EFAEA /* DixieLogger.m */,
F54F5A7419E83346002EFAEA /* SimpleLogger */,
);
path = DixieLogger;
sourceTree = "<group>";
};
F54F5A7419E83346002EFAEA /* SimpleLogger */ = {
isa = PBXGroup;
children = (
F54F5A7519E83346002EFAEA /* DixieSimpleLogger.h */,
F54F5A7619E83346002EFAEA /* DixieSimpleLogger.m */,
);
path = SimpleLogger;
sourceTree = "<group>";
};
F54F5A8519E83346002EFAEA /* MethodInfo */ = {
isa = PBXGroup;
children = (
F54F5A8619E83346002EFAEA /* DixieMethodInfo.h */,
F54F5A8719E83346002EFAEA /* DixieMethodInfo.m */,
);
path = MethodInfo;
sourceTree = "<group>";
};
F54F5A9A19E83346002EFAEA /* ProfileEntry */ = {
isa = PBXGroup;
children = (
F54F5AA219E83346002EFAEA /* DixieProfileEntry.h */,
F54F5AA319E83346002EFAEA /* DixieProfileEntry.m */,
);
path = ProfileEntry;
sourceTree = "<group>";
};
F54F5AA419E83346002EFAEA /* PuppetMaker */ = {
isa = PBXGroup;
children = (
F54F5AA719E83346002EFAEA /* DixiePuppetMaking.h */,
F54F5AA519E83346002EFAEA /* DixieDefaultPuppetMaker.h */,
F54F5AA619E83346002EFAEA /* DixieDefaultPuppetMaker.m */,
);
path = PuppetMaker;
sourceTree = "<group>";
};
F54F5B0019E835B7002EFAEA /* DixieTests */ = {
isa = PBXGroup;
children = (
F5529FD11B010F0A002D2004 /* Predefined profiles */,
F54F5B0119E835B7002EFAEA /* Helpers */,
F54F5B0819E835B7002EFAEA /* Info.plist */,
F54F5B0919E835B7002EFAEA /* Units */,
);
path = DixieTests;
sourceTree = "<group>";
};
F54F5B0119E835B7002EFAEA /* Helpers */ = {
isa = PBXGroup;
children = (
F5529FA51AFD3E12002D2004 /* TestClass.h */,
F5529FA61AFD3E12002D2004 /* TestClass.m */,
F5529FA71AFD3E12002D2004 /* SubTestClass.h */,
F5529FA81AFD3E12002D2004 /* SubTestClass.m */,
F54F5B0619E835B7002EFAEA /* TestPuppetMaker.h */,
F54F5B0719E835B7002EFAEA /* TestPuppetMaker.m */,
F57365881A2A737200D684CE /* ChaosProviderTestClass.h */,
F57365891A2A737200D684CE /* ChaosProviderTestClass.m */,
);
path = Helpers;
sourceTree = "<group>";
};
F54F5B0919E835B7002EFAEA /* Units */ = {
isa = PBXGroup;
children = (
F53EBAC11A1007AF004FAC40 /* RunTimeHelperTests.m */,
F54F5B0A19E835B7002EFAEA /* DixieAPITests.m */,
F54F5B0B19E835B7002EFAEA /* DixieChaosProviderTests.m */,
F54F5B0E19E835B7002EFAEA /* ProfileEntryTests.m */,
F552A0411B01CDB8002D2004 /* RandomParamProviderTests.m */,
);
path = Units;
sourceTree = "<group>";
};
F5529F9B1AFD3C52002D2004 /* ParamProvider */ = {
isa = PBXGroup;
children = (
F5529FA11AFD3C96002D2004 /* DixieBaseParamProvider.h */,
F5529FA21AFD3C96002D2004 /* DixieBaseParamProvider.m */,
F5529F9C1AFD3C52002D2004 /* RandomParamProvider */,
);
path = ParamProvider;
sourceTree = "<group>";
};
F5529F9C1AFD3C52002D2004 /* RandomParamProvider */ = {
isa = PBXGroup;
children = (
F5529F9D1AFD3C52002D2004 /* DixieRandomParamProvider.h */,
F5529F9E1AFD3C52002D2004 /* DixieRandomParamProvider.m */,
);
path = RandomParamProvider;
sourceTree = "<group>";
};
F5529FB81AFD4A82002D2004 /* Runtime */ = {
isa = PBXGroup;
children = (
F5529FB91AFD4A82002D2004 /* DixieCallEnvironment.h */,
F5529FBA1AFD4A82002D2004 /* DixieCallEnvironment.m */,
F5529FBF1AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.h */,
F5529FC01AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m */,
F5529FC11AFD4A82002D2004 /* DixieRunTimeHelper.h */,
F5529FC21AFD4A82002D2004 /* DixieRunTimeHelper.m */,
);
path = Runtime;
sourceTree = "<group>";
};
F5529FD11B010F0A002D2004 /* Predefined profiles */ = {
isa = PBXGroup;
children = (
F5529FD21B010F0A002D2004 /* NSDateProfile.h */,
F5529FD31B010F0A002D2004 /* NSDateProfile.m */,
F5529FD61B010F0A002D2004 /* NSURLProfile.h */,
F5529FD71B010F0A002D2004 /* NSURLProfile.m */,
);
path = "Predefined profiles";
sourceTree = "<group>";
};
F56C7E161A5EFBFD004B946F /* RandomChaosProvider */ = {
isa = PBXGroup;
children = (
F56C7E171A5EFBFD004B946F /* DixieRandomChaosProvider.h */,
F56C7E181A5EFBFD004B946F /* DixieRandomChaosProvider.m */,
);
path = RandomChaosProvider;
sourceTree = "<group>";
};
F5965A3B19C0796C00ED0A6A = {
isa = PBXGroup;
children = (
F54F5A4B19E83346002EFAEA /* Dixie */,
F54F5B0019E835B7002EFAEA /* DixieTests */,
F5965A4519C0796C00ED0A6A /* Products */,
);
sourceTree = "<group>";
};
F5965A4519C0796C00ED0A6A /* Products */ = {
isa = PBXGroup;
children = (
F5965A4419C0796C00ED0A6A /* libDixie.a */,
F5965A4F19C0796C00ED0A6A /* DixieTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
F5965A4319C0796C00ED0A6A /* Dixie */ = {
isa = PBXNativeTarget;
buildConfigurationList = F5965A5519C0796C00ED0A6A /* Build configuration list for PBXNativeTarget "Dixie" */;
buildPhases = (
F5965A4019C0796C00ED0A6A /* Sources */,
F5965A4119C0796C00ED0A6A /* Frameworks */,
F5965A4219C0796C00ED0A6A /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = Dixie;
productName = Dix;
productReference = F5965A4419C0796C00ED0A6A /* libDixie.a */;
productType = "com.apple.product-type.library.static";
};
F5965A4E19C0796C00ED0A6A /* DixieTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = F5965A5819C0796C00ED0A6A /* Build configuration list for PBXNativeTarget "DixieTests" */;
buildPhases = (
F5965A4B19C0796C00ED0A6A /* Sources */,
F5965A4C19C0796C00ED0A6A /* Frameworks */,
F5965A4D19C0796C00ED0A6A /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = DixieTests;
productName = DixTests;
productReference = F5965A4F19C0796C00ED0A6A /* DixieTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
F5965A3C19C0796C00ED0A6A /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0600;
ORGANIZATIONNAME = "Distinction Ltd.";
TargetAttributes = {
F5965A4319C0796C00ED0A6A = {
CreatedOnToolsVersion = 6.0;
};
F5965A4E19C0796C00ED0A6A = {
CreatedOnToolsVersion = 6.0;
};
};
};
buildConfigurationList = F5965A3F19C0796C00ED0A6A /* Build configuration list for PBXProject "Dixie" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = F5965A3B19C0796C00ED0A6A;
productRefGroup = F5965A4519C0796C00ED0A6A /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
F5965A4319C0796C00ED0A6A /* Dixie */,
F5965A4E19C0796C00ED0A6A /* DixieTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
F5965A4D19C0796C00ED0A6A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
F5965A4019C0796C00ED0A6A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F54F5AA819E83346002EFAEA /* DixieBaseChaosProvider.m in Sources */,
F54F5AE619E83346002EFAEA /* DixieDefaultPuppetMaker.m in Sources */,
F54F5AB619E83346002EFAEA /* DixieNilChaosProvider.m in Sources */,
F54F5ABC19E83346002EFAEA /* DixieSequentialChaosProvider.m in Sources */,
F54F5AB419E83346002EFAEA /* DixieExceptionChaosProvider.m in Sources */,
F54F5AAC19E83346002EFAEA /* DixieChaosContext.m in Sources */,
F5529F9F1AFD3C52002D2004 /* DixieRandomParamProvider.m in Sources */,
F54F5AC219E83346002EFAEA /* DixieLogger.m in Sources */,
F5529FCD1AFD4A82002D2004 /* DixieRunTimeHelper.m in Sources */,
F54F5AD019E83346002EFAEA /* DixieMethodInfo.m in Sources */,
F54F5AAA19E83346002EFAEA /* DixieBlockChaosProvider.m in Sources */,
F54F5AAE19E83346002EFAEA /* DixieCompositeChaosProvider.m in Sources */,
F5529FC51AFD4A82002D2004 /* DixieCallEnvironment.m in Sources */,
F54F5AB019E83346002EFAEA /* DixieCompositeCondition.m in Sources */,
F54F5ABE19E83346002EFAEA /* Dixie+Fluent.m in Sources */,
F54F5AB819E83346002EFAEA /* DixieNonChaosProvider.m in Sources */,
F5529FCB1AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m in Sources */,
F5529FA31AFD3C96002D2004 /* DixieBaseParamProvider.m in Sources */,
F56C7E191A5EFBFD004B946F /* DixieRandomChaosProvider.m in Sources */,
F54F5AE419E83346002EFAEA /* DixieProfileEntry.m in Sources */,
F54F5AB219E83346002EFAEA /* DixieConstantChaosProvider.m in Sources */,
F54F5AC419E83346002EFAEA /* DixieSimpleLogger.m in Sources */,
F54F5AC019E83346002EFAEA /* Dixie.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F5965A4B19C0796C00ED0A6A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F54F5AAF19E83346002EFAEA /* DixieCompositeChaosProvider.m in Sources */,
F5529FCE1AFD4A82002D2004 /* DixieRunTimeHelper.m in Sources */,
F5529FDA1B010F0A002D2004 /* NSURLProfile.m in Sources */,
F5529FA01AFD3C52002D2004 /* DixieRandomParamProvider.m in Sources */,
F5529FCC1AFD4A82002D2004 /* NSObject+DixieRunTimeHelper.m in Sources */,
F54F5AAD19E83346002EFAEA /* DixieChaosContext.m in Sources */,
F573658A1A2A737200D684CE /* ChaosProviderTestClass.m in Sources */,
F5529FD81B010F0A002D2004 /* NSDateProfile.m in Sources */,
F54F5ABF19E83346002EFAEA /* Dixie+Fluent.m in Sources */,
F54F5B1319E835B7002EFAEA /* DixieAPITests.m in Sources */,
F56C7E1A1A5EFBFD004B946F /* DixieRandomChaosProvider.m in Sources */,
F54F5AC119E83346002EFAEA /* Dixie.m in Sources */,
F54F5AE519E83346002EFAEA /* DixieProfileEntry.m in Sources */,
F54F5AB519E83346002EFAEA /* DixieExceptionChaosProvider.m in Sources */,
F54F5AC519E83346002EFAEA /* DixieSimpleLogger.m in Sources */,
F54F5AB319E83346002EFAEA /* DixieConstantChaosProvider.m in Sources */,
F54F5AAB19E83346002EFAEA /* DixieBlockChaosProvider.m in Sources */,
F54F5AB119E83346002EFAEA /* DixieCompositeCondition.m in Sources */,
F5529FA91AFD3E12002D2004 /* TestClass.m in Sources */,
F53EBAC21A1007AF004FAC40 /* RunTimeHelperTests.m in Sources */,
F54F5AB919E83346002EFAEA /* DixieNonChaosProvider.m in Sources */,
F54F5AC319E83346002EFAEA /* DixieLogger.m in Sources */,
F54F5AD119E83346002EFAEA /* DixieMethodInfo.m in Sources */,
F54F5ABD19E83346002EFAEA /* DixieSequentialChaosProvider.m in Sources */,
F54F5AA919E83346002EFAEA /* DixieBaseChaosProvider.m in Sources */,
F54F5B1719E835B7002EFAEA /* ProfileEntryTests.m in Sources */,
F54F5AE719E83346002EFAEA /* DixieDefaultPuppetMaker.m in Sources */,
F5529FAA1AFD3E12002D2004 /* SubTestClass.m in Sources */,
F54F5B1419E835B7002EFAEA /* DixieChaosProviderTests.m in Sources */,
F5529FA41AFD3C96002D2004 /* DixieBaseParamProvider.m in Sources */,
F5529FC61AFD4A82002D2004 /* DixieCallEnvironment.m in Sources */,
F54F5B1119E835B7002EFAEA /* TestPuppetMaker.m in Sources */,
F54F5AB719E83346002EFAEA /* DixieNilChaosProvider.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
F5965A5319C0796C00ED0A6A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
F5965A5419C0796C00ED0A6A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
F5965A5619C0796C00ED0A6A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
F5965A5719C0796C00ED0A6A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
F5965A5919C0796C00ED0A6A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = DixieTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
F5965A5A19C0796C00ED0A6A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = DixieTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
F5965A3F19C0796C00ED0A6A /* Build configuration list for PBXProject "Dixie" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F5965A5319C0796C00ED0A6A /* Debug */,
F5965A5419C0796C00ED0A6A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F5965A5519C0796C00ED0A6A /* Build configuration list for PBXNativeTarget "Dixie" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F5965A5619C0796C00ED0A6A /* Debug */,
F5965A5719C0796C00ED0A6A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F5965A5819C0796C00ED0A6A /* Build configuration list for PBXNativeTarget "DixieTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F5965A5919C0796C00ED0A6A /* Debug */,
F5965A5A19C0796C00ED0A6A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = F5965A3C19C0796C00ED0A6A /* Project object */;
}
================================================
FILE: Dixie/Dixie.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Dixie.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Dixie/Dixie.xcodeproj/xcshareddata/xcschemes/Dixie.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4319C0796C00ED0A6A"
BuildableName = "libDixie.a"
BlueprintName = "Dixie"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4319C0796C00ED0A6A"
BuildableName = "libDixie.a"
BlueprintName = "Dixie"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4319C0796C00ED0A6A"
BuildableName = "libDixie.a"
BlueprintName = "Dixie"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: Dixie/Dixie.xcodeproj/xcshareddata/xcschemes/DixieTests.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4E19C0796C00ED0A6A"
BuildableName = "DixieTests.xctest"
BlueprintName = "DixieTests"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4E19C0796C00ED0A6A"
BuildableName = "DixieTests.xctest"
BlueprintName = "DixieTests"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4E19C0796C00ED0A6A"
BuildableName = "DixieTests.xctest"
BlueprintName = "DixieTests"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4E19C0796C00ED0A6A"
BuildableName = "DixieTests.xctest"
BlueprintName = "DixieTests"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F5965A4E19C0796C00ED0A6A"
BuildableName = "DixieTests.xctest"
BlueprintName = "DixieTests"
ReferencedContainer = "container:Dixie.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: Dixie/DixieTests/Helpers/ChaosProviderTestClass.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import <Foundation/Foundation.h>
#import <CoreGraphics/CGGeometry.h>
typedef int(^TestBlockType)(double, BOOL);
@protocol ChaosProviderTestClassDelegate <NSObject>
-(BOOL) isItTrue;
@end
/*!
A class to test various method types
*/
@interface ChaosProviderTestClass : NSObject
@property (nonatomic, weak) id<ChaosProviderTestClassDelegate> testDelegate;
-(id) returnValue;
-(NSNumber*) numberFromInteger:(int)integer;
-(NSString*) variadicMethod:(id)key,... NS_REQUIRES_NIL_TERMINATION;
-(int) returnIntValue;
+(void) classDoNothing;
-(void) throwException;
-(void) doNothing;
-(void) setNumber:(int)number object:(NSNumber *)numberObj block:(dispatch_block_t)block;
-(void) setChar:(char)aChar frame:(CGRect)frame;
-(id) arg1:(NSNumber *)arg1 arg2:(NSInteger)arg2 arg3:(double)arg3 arg4:(float)arg4 arg5:(int)arg5 arg6:(int*)arg6 arg7:(BOOL)arg7 arg8:(char)arg8 arg9:(short)arg9 arg10:(long)arg10;
-(float) valueFrom:(double)doubleValue;
-(TestBlockType) block;
@end
@interface ChaosProviderTestClass(aCategory)
-(unsigned int) randomIntFrom:(int)k;
@end
================================================
FILE: Dixie/DixieTests/Helpers/ChaosProviderTestClass.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "ChaosProviderTestClass.h"
@implementation ChaosProviderTestClass
- (instancetype)init
{
self = [super init];
if (self) {
}
return self;
}
+ (void)classDoNothing
{
}
-(id)returnValue
{
return @2;
}
-(NSNumber*) numberFromInteger:(int)integer
{
return @(integer);
}
-(NSString*) variadicMethod:(id)key,... NS_REQUIRES_NIL_TERMINATION
{
return @"";
}
-(int)returnIntValue
{
return 42;
}
- (void)throwException
{
@throw [NSException exceptionWithName:@"Test" reason:@"Arbitrary reason" userInfo:nil];
}
- (void)doNothing
{
}
-(void) setNumber:(int)number object:(NSNumber *)numberObj block:(dispatch_block_t)block;
{
}
-(void) setChar:(char)aChar frame:(CGRect)frame
{
}
-(short) _veryPrivateMethod
{
return 0;
}
-(id) arg1:(NSNumber *)arg1 arg2:(NSInteger)arg2 arg3:(double)arg3 arg4:(float)arg4 arg5:(int)arg5 arg6:(int*)arg6 arg7:(BOOL)arg7 arg8:(char)arg8 arg9:(short)arg9 arg10:(long)arg10
{
return [@(arg1.integerValue + arg2 + arg3 + arg4 + arg5 + *arg6 + arg7 +arg8 + arg9 + arg10) stringValue];
}
-(float) valueFrom:(double)doubleValue
{
return [@(doubleValue) floatValue];
}
-(TestBlockType) block
{
return ^int(double d, BOOL b){ return b ? d : 42;};
}
@end
@implementation ChaosProviderTestClass (aCategory)
-(unsigned int) randomIntFrom:(int)k
{
return arc4random_uniform(k);
}
@end
================================================
FILE: Dixie/DixieTests/Helpers/SubTestClass.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "TestClass.h"
/**
* Inheriting form RunTestClass, this methods defines methods that can be used in ProfileEnty tests
*/
@interface SubTestClass : TestClass
-(void)specialMethod;
@end
================================================
FILE: Dixie/DixieTests/Helpers/SubTestClass.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "SubTestClass.h"
@implementation SubTestClass
-(void)specialMethod
{
}
-(void) doNothing
{
}
@end
================================================
FILE: Dixie/DixieTests/Helpers/TestClass.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import <Foundation/Foundation.h>
#import <CoreGraphics/CGGeometry.h>
@interface TestClass : NSObject
+ (void)classDoNothing;
- (id)returnValue;
- (int)returnIntValue;
- (void)doNothing;
-(void) setNumber:(int)number object:(NSNumber *)numberObj block:(dispatch_block_t)block;
-(void) setChar:(char)aChar frame:(CGRect)frame;
@end
================================================
FILE: Dixie/DixieTests/Helpers/TestClass.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "TestClass.h"
@implementation TestClass
+ (void)classDoNothing
{
}
- (id)returnValue
{
return @2;
}
- (int)returnIntValue
{
return 42;
}
- (void)doNothing
{
}
-(void) setNumber:(int)number object:(NSNumber *)numberObj block:(dispatch_block_t)block;
{
}
-(void) setChar:(char)aChar frame:(CGRect)frame
{
}
@end
================================================
FILE: Dixie/DixieTests/Helpers/TestPuppetMaker.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
@import Foundation;
#import "DixiePuppetMaking.h"
@interface TestPuppetMaker : NSObject <DixiePuppetMaking>
@property BOOL isCreateCalled;
@property BOOL isDismissCalled;
@end
================================================
FILE: Dixie/DixieTests/Helpers/TestPuppetMaker.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "TestPuppetMaker.h"
@implementation TestPuppetMaker
-(id) init
{
if (self = [super init])
{
self.isCreateCalled = NO;
self.isDismissCalled = NO;
}
return self;
}
-(void) createPuppet:(DixieProfileEntry*)entry seed:(NSInteger)seed
{
self.isCreateCalled = YES;
}
-(void) dismissPuppet:(DixieProfileEntry*)entry
{
self.isDismissCalled = YES;
}
@end
================================================
FILE: Dixie/DixieTests/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.distinction.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
FILE: Dixie/DixieTests/Predefined profiles/NSDateProfile.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieProfileEntry.h"
/**
* A simple ProfileEntry with default values:
* victim: NSDate
* selector: date
* chaosProvider: ConstantChaosProvider for next week
*/
@interface NSDateProfile : DixieProfileEntry
@end
================================================
FILE: Dixie/DixieTests/Predefined profiles/NSDateProfile.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "NSDateProfile.h"
#import "DixieConstantChaosProvider.h"
@implementation NSDateProfile
-(instancetype) init
{
return [[self class] entry:[NSDate class] selector:@selector(date) chaosProvider:[DixieConstantChaosProvider constant:[NSDate dateWithTimeIntervalSinceNow:60*60*24]]];
}
@end
================================================
FILE: Dixie/DixieTests/Predefined profiles/NSURLConnectionProfile.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieProfileEntry.h"
/**
* A simple ProfileEntry with default values:
* victim: NSURLConnection
* selector: canHandleRequest:
* chaosProvider: NilChaosProvider
*/
@interface NSURLConnectionProfile : DixieProfileEntry
@end
================================================
FILE: Dixie/DixieTests/Predefined profiles/NSURLConnectionProfile.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "NSURLConnectionProfile.h"
#import "DixieNilChaosProvider.h"
@implementation NSURLConnectionProfile
-(instancetype) init
{
return [[self class] entry:[NSURLConnection class] selector:@selector(canHandleRequest:) chaosProvider:[DixieNilChaosProvider new]];
}
@end
================================================
FILE: Dixie/DixieTests/Predefined profiles/NSURLProfile.h
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieProfileEntry.h"
/**
* A simple ProfileEntry with default values:
* victim: NSURL
* selector: URLWithString:
* chaosProvider: NilChaosProvider
*/
@interface NSURLProfile : DixieProfileEntry
@end
================================================
FILE: Dixie/DixieTests/Predefined profiles/NSURLProfile.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "NSURLProfile.h"
#import "DixieProfileEntry.h"
#import "DixieHeaders.h"
@implementation NSURLProfile
-(instancetype) init
{
return [[self class] entry:[NSURL class] selector:@selector(URLWithString:) chaosProvider:[DixieNilChaosProvider new]];
}
@end
================================================
FILE: Dixie/DixieTests/Units/DixieAPITests.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import "DixieHeaders.h"
#import <XCTest/XCTest.h>
#import "NSURLProfile.h"
#import "TestPuppetMaker.h"
#import "NSURLProfile.h"
@interface DixieAPITests : XCTestCase
{
Dixie* dixie;
}
@end
@implementation DixieAPITests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
dixie = [Dixie new];
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
[dixie revert];
}
-(void) testPuppetMakerCreatePuppetCalled
{
//GIVEN
TestPuppetMaker* puppetMaker = [TestPuppetMaker new];
//WHEN
dixie
.PuppetMaker(puppetMaker)
.Profile([NSURLProfile new])
.Apply();
//THEN
XCTAssert(puppetMaker.isCreateCalled == YES, @"CreatePuppet protocol function should be called");
}
-(void) testPuppetMakerMultiplePuppetCreationReverted
{
//GIVEN
NSURLProfile* profile = [NSURLProfile new];
//WHEN
dixie
.Profile(profile)
.Apply();
dixie.Apply();
dixie.RevertIt(profile);
//THEN
XCTAssert([[NSURL URLWithString:@"http://www.something.net"].absoluteString isEqualToString:@"http://www.something.net"], @"Multiple puppet creation should be reverted");
}
-(void) testPuppetMakerDismissPuppetCalled
{
//GIVEN
TestPuppetMaker* puppetMaker = [TestPuppetMaker new];
dixie
.PuppetMaker(puppetMaker)
.Profile([NSURLProfile new])
.Apply();
//WHEN
dixie
.Revert();
//THEN
XCTAssert(puppetMaker.isDismissCalled == YES, @"DismissPuppet protocol function should be called");
}
-(void) testSingleProfileAdded {
//GIVEN
DixieProfileEntry* singleProfile = [NSURLProfile new];
//WHEN
dixie
.Profile(singleProfile)
.Apply();
//THEN
XCTAssert( [NSURL URLWithString:@"http://www.something.net"] == nil, @"NSURL should be nil");
}
-(void) testPuppetCanBeCalledMultipleTimes {
//GIVEN
DixieProfileEntry* singleProfile = [NSURLProfile new];
//WHEN
dixie
.Profile(singleProfile)
.Apply();
//THEN
XCTAssert( [NSURL URLWithString:@"http://www.something.net"] == nil && [NSURL URLWithString:@"http://www.something.net"] == nil, @"NSURL should be nil");
}
-(void) testSingleProfileReverted
{
//GIVEN
DixieProfileEntry* entry1 = [DixieProfileEntry entry:[NSURL class] selector:@selector(URLWithString:) chaosProvider:[DixieNilChaosProvider new]];
DixieProfileEntry* entry2 = [DixieProfileEntry entry:[NSURL class] selector:@selector(baseURL) chaosProvider:[DixieNilChaosProvider new]];
dixie
.Profiles(@[entry1 , entry2])
.Apply();
//WHEN
dixie.RevertIt(entry1);
//THEN
NSURL* url = [NSURL URLWithString:@"http://something.net"];
XCTAssert(url != nil && url.baseURL == nil, @"First entry should be reverted and second not");
}
-(void) testMultipleProfileReverted
{
//GIVEN
DixieProfileEntry* entry1 = [DixieProfileEntry entry:[NSURL class] selector:@selector(URLWithString:) chaosProvider:[DixieNilChaosProvider new]];
DixieProfileEntry* entry2 = [DixieProfileEntry entry:[NSURL class] selector:@selector(baseURL) chaosProvider:[DixieNilChaosProvider new]];
dixie
.Profiles(@[entry1 , entry2])
.Apply();
//WHEN
dixie.Revert();
//THEN
NSURL* url = [NSURL URLWithString:@"http://something.net"];
XCTAssert(url != nil && url.baseURL == nil, @"First entry should be reverted and second not");
}
@end
================================================
FILE: Dixie/DixieTests/Units/DixieChaosProviderTests.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import <XCTest/XCTest.h>
#import "DixieHeaders.h"
#import "ChaosProviderTestClass.h"
#import "NSObject+DixieRunTimeHelper.h"
@interface DixieChaosProviderTests : XCTestCase <ChaosProviderTestClassDelegate>
{
Dixie* dixie;
}
@end
@implementation DixieChaosProviderTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
dixie = [Dixie new];
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[dixie revert];
[super tearDown];
}
#pragma mark - Nil
-(void) testFluentNilChaosProvider
{
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(returnValue) chaosProvider:[DixieNilChaosProvider new]];
dixie
.Profile(profile)
.Apply();
id value = [[ChaosProviderTestClass new] returnValue];
XCTAssert( value == nil , "Value should be nil");
}
#pragma mark - Non
-(void) testNonChaosProvider
{
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(returnValue) chaosProvider:[DixieNonChaosProvider new]];
dixie
.Profile(profile)
.Apply();
id value = [[ChaosProviderTestClass new] returnValue];
XCTAssert([value isEqualToNumber:@2], "ChaosProviderTestClass should be kept unchanged");
}
-(void) testForwardChaosToNonChaosProvider
{
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(returnValue) chaosProvider:[DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
[chaosProvider forwardChaosOf:victim environment:environment to:[DixieNonChaosProvider new]];
}]];
dixie
.Profile(profile)
.Apply();
NSDate* date = [NSDate date];
XCTAssert(date, "NSDate should be kept unchanged");
}
#pragma mark - Constant
-(void) testConstantChaosProvider
{
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(returnValue) chaosProvider:[DixieConstantChaosProvider constant:@7]];
dixie
.Profile(profile)
.Apply();
id value = [[ChaosProviderTestClass new] returnValue];
XCTAssert( [value isEqualToNumber:@7] , "Number should be 7");
}
#pragma mark - Composite
-(void) testCompositeChaosProvider
{
DixieCompositeCondition* condition = [DixieCompositeCondition condition:0 value:@2 chaosProvider:[DixieNilChaosProvider new]];
DixieCompositeChaosProvider* provider = [DixieCompositeChaosProvider conditions:@[condition]];
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(numberFromInteger:) chaosProvider:provider];
dixie
.Profile(profile)
.Apply();
id value = [[ChaosProviderTestClass new] numberFromInteger:2];
XCTAssert(value == nil, "Value should be nil");
value = [[ChaosProviderTestClass new] numberFromInteger:8];
XCTAssert([value isEqualToNumber:@8], "Value should be created");
}
#pragma mark - Block
-(void) testBlockChaosProvider
{
DixieBlockChaosProvider* provider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider* provider, id victim, DixieCallEnvironment *environment) {
NSNumber* param = [environment.arguments firstObject];
environment.returnValue = (__bridge void *)(@(param.integerValue + 1));
}];
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(numberFromInteger:) chaosProvider:provider];
dixie
.Profile(profile)
.Apply();
id value = [[ChaosProviderTestClass new] numberFromInteger:2];
XCTAssert([value isEqualToNumber:@3] , "Value should be incremented");
}
#pragma mark - Random
-(void) testRandomIntChaosProvider
{
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class]
selector:@selector(returnValue)
chaosProvider:[DixieRandomChaosProvider randomProvider:[DixieRandomParamProvider providerWithUpperBound:100]]];
dixie
.Profile(profile)
.Apply();
id returnValue = [[ChaosProviderTestClass new] returnValue];
id returnValue2 = [[ChaosProviderTestClass new] returnValue];
XCTAssert(![returnValue isEqualToNumber:returnValue2], "Values should be random");
}
#pragma mark - Exception
-(void) testExceptionChaosProvider
{
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class]
selector:@selector(returnValue)
chaosProvider:[DixieExceptionChaosProvider exception:[NSException exceptionWithName:@"ChaosProviderException"
reason:@"ExceptionChaosProvider was applied"
userInfo:nil]]];
dixie
.Profile(profile)
.Apply();
XCTAssertThrowsSpecificNamed([[ChaosProviderTestClass new] returnValue], NSException, @"ChaosProviderException", @"Should throw a NSException");
}
#pragma mark - Sequential
-(void) testSequentalChaosProvider
{
//GIVEN
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class]
selector:@selector(returnValue)
chaosProvider:[DixieSequentialChaosProvider sequence:@[ [DixieNilChaosProvider new] , [DixieConstantChaosProvider constant:@2]]]];
dixie
.Profile(profile)
.Apply();
//WHEN
id returnValue = [[ChaosProviderTestClass new] returnValue];
id returnValue2 = [[ChaosProviderTestClass new] returnValue];
//THEN
XCTAssert(returnValue == nil && [returnValue2 isEqual:@2], @"Sequential should return nil for the first call and @2 for the second call");
}
-(void) testSequentialReturnsLastAtOutOfBounds
{
//GIVEN
DixieProfileEntry* profile = [DixieProfileEntry entry:[ChaosProviderTestClass class]
selector:@selector(returnValue)
chaosProvider:[DixieSequentialChaosProvider sequence:@[ [DixieNilChaosProvider new] , [DixieConstantChaosProvider constant:@2]]]];
dixie
.Profile(profile)
.Apply();
//WHEN
[[ChaosProviderTestClass new] returnValue];
[[ChaosProviderTestClass new] returnValue];
id returnValue = [[ChaosProviderTestClass new] returnValue];
//THEN
XCTAssert([returnValue isEqual:@2], @"Sequential should return the result of the last chaos provider, when called more then the count of the defined providers");
}
#pragma mark - Variadic
-(void) testChaosForwardedToVariadic
{
//GIVEN
DixieBlockChaosProvider* blockProvider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
[chaosProvider forwardChaosOf:victim environment:environment to:[DixieNonChaosProvider new]];
}];
DixieProfileEntry* entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(variadicMethod:) chaosProvider:blockProvider];
dixie
.Profile(entry)
.Apply();
ChaosProviderTestClass* testObject = [ChaosProviderTestClass new];
//WHEN
NSString* string = [testObject variadicMethod:@"key", @"haho", @2, nil];
//THEN
XCTAssert([string isEqualToString:@""], @"Original variadic function should be called");
}
-(void) testVariadicStubbed
{
//GIVEN
DixieConstantChaosProvider *provider = [DixieConstantChaosProvider constant:@"Hello"];
DixieProfileEntry *entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(variadicMethod:) chaosProvider:provider];
dixie.Profile(entry).Apply();
//WHEN
NSString *string = [[ChaosProviderTestClass new] variadicMethod:@"key",@2,nil];
//THEN
XCTAssert([string isEqualToString:@"Hello"], @"Wrong return value for variadic stubbing");
}
#pragma mark - Primitives
-(void) testChaosForPrimitiveReturnType
{
//GIVEN
int intValue = 11;
DixieBlockChaosProvider* blockProvider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
environment.returnValue = (void *)&intValue;
}];
DixieProfileEntry* entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(returnIntValue) chaosProvider:blockProvider];
dixie
.Profile(entry)
.Apply();
ChaosProviderTestClass* testObject = [ChaosProviderTestClass new];
//WHEN
int returnedIntValue = [testObject returnIntValue];
//THEN
XCTAssert(returnedIntValue == 11, @"New int value should be returned");
}
-(void) testChaosPrimitiveParameterIsForwarded
{
//GIVEN
DixieBlockChaosProvider* blockProvider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
NSNumber *newNumber = @11;
storeOriginal(@11, int, 11);
NSMutableArray *myArguments = [environment.arguments mutableCopy];
myArguments[0] = newNumber;
environment.arguments = myArguments;
[chaosProvider forwardChaosOf:victim environment:environment to:[DixieNonChaosProvider new]];
}];
DixieProfileEntry* entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(numberFromInteger:) chaosProvider:blockProvider];
dixie
.Profile(entry)
.Apply();
ChaosProviderTestClass* testObject = [ChaosProviderTestClass new];
//WHEN
NSNumber *number = [testObject numberFromInteger:42];
//THEN
XCTAssert([number isEqualToNumber:@11], @"New int value should be returned");
}
#pragma mark - Method type fuzzing
-(void) testPropertyGetterSetterChanged
{
//GIVEN
DixieBlockChaosProvider *setterBlockProvider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
//THEN
XCTAssert(environment.arguments.firstObject == self, @"First argument is invalid");
}];
DixieBlockChaosProvider *getterBlockProvider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
environment.returnValue = (__bridge void *)(self);
}];
DixieProfileEntry *setterEntry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(setTestDelegate:) chaosProvider:setterBlockProvider];
DixieProfileEntry *getterEntry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(testDelegate) chaosProvider:getterBlockProvider];
ChaosProviderTestClass *testObject = [ChaosProviderTestClass new];
//WHEN
dixie.Profile(setterEntry).Apply();
[testObject setTestDelegate:self];
dixie.RevertIt(setterEntry);
[testObject setTestDelegate:nil];
dixie.Profile(getterEntry).Apply();
//THEN
XCTAssert(testObject.testDelegate == self, @"Getter property invalid");
}
-(void) testPrivateMethodChanged
{
//GIVEN
short original = 2;
NSNumber *number = @2;
storeOriginal(number, short, original);
DixieConstantChaosProvider *provider = [DixieConstantChaosProvider constant:number];
dixie
.Profile([DixieProfileEntry entry:[ChaosProviderTestClass class] selector:NSSelectorFromString(@"_veryPrivateMethod") chaosProvider:provider])
.Apply();
//WHEN
NSNumber *value = [[ChaosProviderTestClass new] valueForKeyPath:@"_veryPrivateMethod"];
//THEN
XCTAssert([value isEqualToNumber:@2], @"Private method is not changed");
}
-(void) testUltimateMethodChanged
{
//GIVEN
DixieNilChaosProvider *provider = [DixieNilChaosProvider new];
DixieProfileEntry *entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(arg1:arg2:arg3:arg4:arg5:arg6:arg7:arg8:arg9:arg10:) chaosProvider:provider];
dixie.Profile(entry).Apply();
//WHEN
int arg6 = 2;
id value = [[ChaosProviderTestClass new] arg1:@2 arg2:2 arg3:2.0 arg4:2.f arg5:2 arg6:&arg6 arg7:NO arg8:'a' arg9:5 arg10:67l];
//THEN
XCTAssert(value == nil,@"Ultimate method not changed");
}
-(void) testUseBlockParameterOfMethod
{
//GIVEN
__block BOOL called = NO;
dispatch_block_t aBlock = ^{called = YES;};
DixieBlockChaosProvider *blockProvider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
dispatch_block_t block = environment.arguments[2];
block();
}];
DixieProfileEntry *entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(setNumber:object:block:) chaosProvider:blockProvider];
dixie.Profile(entry).Apply();
//WHEN
[[ChaosProviderTestClass new] setNumber:2 object:@2 block:aBlock];
//THEN
XCTAssert(called == YES, @"Block parameter of method is not called");
}
-(void) testUseBlockReturnType
{
//GIVEN
DixieConstantChaosProvider *provider = [DixieConstantChaosProvider constant:[^int(double d, BOOL b){return (int)b;} copy]];
DixieProfileEntry *entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(block) chaosProvider:provider];
dixie.Profile(entry).Apply();
//WHEN
TestBlockType block = [[ChaosProviderTestClass new] block];
//THEN
XCTAssert(block(0.4,YES) == 1, @"Wrong block returned");
}
-(void) testCategoryMethodChanged
{
//GIVEN
unsigned int k = 103;
NSNumber *number = @(k);
storeOriginal(number, unsigned int, k);
DixieProfileEntry *entry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(randomIntFrom:) chaosProvider:[DixieConstantChaosProvider constant:number]];
dixie.Profile(entry).Apply();
//WHEN
unsigned int n = [[ChaosProviderTestClass new] randomIntFrom:4];
//THEN
XCTAssert(n == k, @"Category method is not changed");
}
- (void)testProtocolParamUsed
{
//GIVEN
__block BOOL answer = NO;
DixieBlockChaosProvider *setterBlockProvider = [DixieBlockChaosProvider block:^(DixieBaseChaosProvider *chaosProvider, id victim, DixieCallEnvironment *environment) {
answer = [(id<ChaosProviderTestClassDelegate>)environment.arguments.firstObject isItTrue];
}];
DixieProfileEntry *setterEntry = [DixieProfileEntry entry:[ChaosProviderTestClass class] selector:@selector(setTestDelegate:) chaosProvider:setterBlockProvider];
dixie.Profile(setterEntry).Apply();
//WHEN
[[ChaosProviderTestClass new] setTestDelegate:self];
//THEN
XCTAssert(answer == YES, @"Protocol parameter could not be used");
}
#pragma mark - ChaosProviderTestClassDelegate
-(BOOL) isItTrue
{
return YES;
}
@end
================================================
FILE: Dixie/DixieTests/Units/ProfileEntryTests.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import <XCTest/XCTest.h>
#import "DixieHeaders.h"
#import "TestClass.h"
#import "SubTestClass.h"
#import "NSDateProfile.h"
@interface ProfileEntryTests : XCTestCase
@end
@implementation ProfileEntryTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testEntriesCreated {
NSArray* excludes = @[NSStringFromSelector(@selector(signature))];
NSArray* entries = [DixieProfileEntry entries:[DixieChaosContext class] excludes:excludes chaosProvider:[DixieNilChaosProvider new]];
BOOL hasExcluded = YES;
NSString* selectorName;
for (DixieProfileEntry* entry in entries) {
selectorName = NSStringFromSelector(entry.methodInfo.selector);
if ([excludes containsObject:selectorName]) {
hasExcluded = NO;
break;
}
}
XCTAssert(hasExcluded, "There should not be a profile entry with excluded selector:%@", selectorName);
}
-(void) testExcludedClassSelectorsNotIncludedInProfileEntries
{
//Given
Class classToExclude = [TestClass class];
NSArray* excludedSelectors = [DixieRunTimeHelper selectorsForClass:classToExclude];
//When
NSArray* entries = [DixieProfileEntry entries:[SubTestClass class] excludeSelectorsOfClass:classToExclude chaosProvider:[DixieNilChaosProvider new]];
//Then
BOOL areEntriesCorrect = YES;
for (DixieProfileEntry* entry in entries) {
NSString* selectorName = NSStringFromSelector(entry.methodInfo.selector);
if ([excludedSelectors containsObject:selectorName]) {
areEntriesCorrect = NO;
break;
}
}
XCTAssertTrue(areEntriesCorrect, @"ProfileEntry method did not excluded the selectors of the class");
}
#pragma mark - Pre-defined entries
#pragma NSDateProfile
-(void) testDateProfileIsCorrect
{
//GIVEN
NSDateProfile* profile = [NSDateProfile new];
//WHEN
BOOL isTargetClassCorrect = [profile.methodInfo.targetClass isSubclassOfClass:[NSDate class]];
BOOL isSelectorCorrect = [NSStringFromSelector( profile.methodInfo.selector ) isEqualToString:NSStringFromSelector(@selector(date))];
BOOL isChaosProviderCorrect = [profile.chaosProvider isKindOfClass:[DixieConstantChaosProvider class]];
XCTAssert(isTargetClassCorrect && isSelectorCorrect && isChaosProviderCorrect, @"NSDateProfile should target +[NSDate date] with a ConstantChaosProvider");
}
@end
================================================
FILE: Dixie/DixieTests/Units/RandomParamProviderTests.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "RandomChaosProvider.h"
@interface RandomParamProviderTests : XCTestCase
{
RandomParamProvider* _paramProvider;
}
@end
@implementation RandomParamProviderTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
_paramProvider = [RandomParamProvider providerWithUpperBound:1000];
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testProviderDoesNotReturnAlwaysSameValue {
//GIVEN
[_paramProvider setSeed:0];
//WHEN
NSNumber* value1 = [_paramProvider parameter];
NSNumber* value2 = [_paramProvider parameter];
NSNumber* value3 = [_paramProvider parameter];
NSArray* numbers = @[value1, value2, value3];
//THEN
NSSet* uniqueValues = [NSSet setWithArray:numbers];
XCTAssert(uniqueValues.allObjects.count == numbers.count, @"Some of the values are the same");
}
- (void)testProviderReturnsSameSequenceForSameSeed {
//GIVEN
[_paramProvider setSeed:0];
RandomParamProvider* anotherProvider = [RandomParamProvider providerWithUpperBound:1000];
[anotherProvider setSeed:0];
//WHEN
NSMutableArray* sequence = [NSMutableArray array];
NSMutableArray* anotherSequence = [NSMutableArray array];
for (int i = 0; i < 3; i++) {
[sequence addObject:[_paramProvider parameter]];
[anotherSequence addObject:[anotherProvider parameter]];
}
//THEN
XCTAssert([sequence isEqualToArray:anotherSequence], @"Random generator should return same sequence with same starting seed");
}
@end
================================================
FILE: Dixie/DixieTests/Units/RunTimeHelperTests.m
================================================
//
// Dixie
// Copyright 2015 Skyscanner Limited
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
#import <XCTest/XCTest.h>
#import "DixieRunTimeHelper.h"
#import "TestClass.h"
@interface DixieRunTimeHelper(UnitTest)
+(NSArray*) argumentsFor:(NSMethodSignature*)signature originalArguments:(va_list)arguments;
+(id) objectFromNext:(va_list)arguments type:(const char*)argType outputArgumentList:(out void *)oVa_List;
+(id) blockForSignature:(NSMethodSignature*)signature block:(DixieImplementationBlock)block;
@end
@interface RunTimeHelperTests : XCTestCase
@end
@implementation RunTimeHelperTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testCorrectImplementationCalled
{
//Given
DixieMethodInfo* info = [DixieMethodInfo infoWithClass:[TestClass class] selector:@selector(returnValue)];
DixieChaosContext* context = [[DixieChaosContext alloc] init:0 methodInfo:info];
//When
__block BOOL isIMPCalled = NO;
id(*implementation)(id,SEL) = (id(*)(id,SEL))[DixieRunTimeHelper implementationWithChaosContext:context environment:^(id victim, DixieCallEnvironment *environment) {
isIMPCalled = YES;
}];
implementation([TestClass new], @selector(returnValue));
XCTAssert(isIMPCalled, @"Correct IMP should be returned");
}
-(void)testImplementationIsCalled
{
//Given
DixieMethodInfo* info = [DixieMethodInfo infoWithClass:[TestClass class] selector:@selector(returnValue)];
DixieChaosContext* context = [[DixieChaosContext alloc] init:0 methodInfo:info];
DixieCallEnvironment* environment = [DixieCallEnvironment new];
IMP implementation = [[TestClass new] methodForSelector:@selector(returnValue)];
//When
[DixieRunTimeHelper callImplementation:implementation on:[TestClass new] chaosContext:context environment:environment];
//Then
XCTAssert([(NSNumber *)environment.returnValue isEqualToNumber:@2], @"IMP should be called correctly");
}
-(void)testClassVoidImplementationIsCalled
{
//Given
DixieMethodInfo* info = [DixieMethodInfo infoWithClass:[TestClass class] selector:@selector(classDoNothing)];
DixieChaosContext* context = [[DixieChaosContext alloc] init:0 methodInfo:info];
DixieCallEnvironment* environment = [DixieCallEnvironment new];
IMP implementation = [[TestClass class] methodForSelector:@selector(classDoNothing)];
//When
@try {
[DixieRunTimeHelper callImplementation:implementation on:[TestClass class] chaosContext:context environment:environment];
}
@catch (NSException *exception) {
//Then
XCTFail(@"Class void implementation should be called");
}
}
- (void)testValuesCorrectlyConverted {
//Given - Hack to create va_list
id(^testBlock)(const char*, ...) = ^id(const char* encoding, ...){
va_list arguments;
va_start(arguments, encoding);
id object = [DixieRunTimeHelper objectFromNext:arguments type:encoding outputArgumentList:arguments];
va_end(arguments);
return object;
};
XCTAssert([testBlock(@encode(char),'c') isEqualToNumber:@('c')], @"%c converted wrongly", 'c');
XCTAssert([testBlock(@encode(int),2) isEqualToNumber:@2], @"%d converted wrongly", 2);
XCTAssert([testBlock(@encode(BOOL),YES) isEqualToNumber:@YES], @"%d converted wrongly", YES);
XCTAssert([testBlock(@encode(long),12345678L) isEqualToNumber:@12345678L], @"%ld converted wrongly", 12345678L);
XCTAssert([testBlock(@encode(float), 4.5f) isEqualToNumber:@4.5f], @"%f converted wrongly", 4.5f);
XCTAssert([testBlock(@encode(double),5.0) isEqualToNumber:@5.0], @"%lf converted wrongly", 5.0);
XCTAssert([testBlock(@encode(char*),"temp") isEqualToString:@"temp"], @"%s converted wrongly", "temp");
XCTAssert([testBlock(@encode(Class),[NSNumber class]) isEqualToString:@"NSNumber"], @"%@ converted wrongly", [NSNumber class]);
XCTAssert([testBlock(@encode(SEL),@selector(testValuesCorrectlyConverted)) isEqualToString:@"testValuesCorrectlyConverted"], @"%@ converted wrongly", NSStringFromSelector(@selector(testValuesCorrectlyConverted)));
}
//Structs are currently not supported, so DixieRunTimeHelper will fail and adds an NSNull into the arguments array
-(void) testArgumentObjectsCreatedCorrectly
{
//Given - Hack to create va_list
^(NSString* first, ...){
NSArray* expectedValues = @[
@('c'),
[NSNull null]
];
va_list arguments;
va_start(arguments, first);
NSMethodSignature* signature = [[TestClass new] methodSignatureForSelector:@selector(setChar:frame:)];
//When
NSArray* values = [DixieRunTimeHelper argumentsFor:signature originalArguments:arguments];
va_end(arguments);
//Then
XCTAssert([expectedValues isEqualToArray:values], @"Values should be corrected into objects");
}(@"Input value:",'c', CGRectMake(0, 0, 0, 0));
}
-(void) testArgumentObjectsCretedCorrectlyForBlock
{
//Given
NSMethodSignature* signature = [[TestClass new] methodSignatureForSelector:@selector(setNumber:object:block:)];
//When
void(^block)(id,...) = [DixieRunTimeHelper blockForSignature:signature block:^(id victim, DixieCallEnvironment *environment) {
//Then
XCTAssert([environment.arguments[0] intValue] == 2, @"First parameter should be an int");
XCTAssert([environment.arguments[1] isEqualToNumber:@2], @"Second parameter should be an int");
BOOL(^thirdParameter)(void) = environment.arguments[2];
XCTAssert(thirdParameter(), @"Third parameter should be a block");
}];
//For blocks, do NOT send the selector
block([TestClass new],2,@2,[^{return YES;} copy]);
}
-(void) testVoidBlockReturned
{
//Given
NSMethodSignature* signature = [[TestClass new] methodSignatureForSelector:@selector(doNothing)];
//When
void(^block)(id,...) = [DixieRunTimeHelper blockForSignature:signature block:^(id victim, DixieCallEnvironment *environment) {}];
//Then
@try {
block([TestClass new], @selector(doNothing));
}
@catch (NSException *exception) {
XCTFail(@"Correct void block should be returned");
}
}
-(void) testIdReturnBlockReturned
{
//Given
NSMethodSignature* signature = [[TestClass new] methodSignatureForSelector:@selector(returnValue)];
//When
id(^block)(id, ...) = [DixieRunTimeHelper blockForSignature:signature block:^(id victim, DixieCallEnvironment *environment) {
environment.returnValue = (__bridge void *)(@2);
}];
//Then
@try {
id returnValue = block([TestClass new], @selector(returnValue));
XCTAssert([returnValue isEqualToNumber:@2], @"Correct id value should be returned");
}
@catch (NSException *exception) {
XCTFail(@"Correct void block should be returned");
}
}
-(void) testIntReturnBlockReturned
{
//Given
NSMethodSignature* signature = [[TestClass new] methodSignatureForSelector:@selector(returnIntValue)];
//When
int intValue = 11;
int(^block)(id, ...) = [DixieRunTimeHelper blockForSignature:signature block:^(id victim, DixieCallEnvironment *environment) {
environment.returnValue = (void *)&intValue;
}];
gitextract_dxkqxvqx/ ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Dixie/ │ ├── Dixie/ │ │ ├── ChaosProvider/ │ │ │ ├── BlockChaosProvider/ │ │ │ │ ├── DixieBlockChaosProvider.h │ │ │ │ └── DixieBlockChaosProvider.m │ │ │ ├── CompositeChaosProvider/ │ │ │ │ ├── DixieCompositeChaosProvider.h │ │ │ │ ├── DixieCompositeChaosProvider.m │ │ │ │ ├── DixieCompositeCondition.h │ │ │ │ └── DixieCompositeCondition.m │ │ │ ├── ConstantChaosProvider/ │ │ │ │ ├── DixieConstantChaosProvider.h │ │ │ │ └── DixieConstantChaosProvider.m │ │ │ ├── DixieBaseChaosProvider.h │ │ │ ├── DixieBaseChaosProvider.m │ │ │ ├── DixieChaosContext.h │ │ │ ├── DixieChaosContext.m │ │ │ ├── ExceptionChaosProvider/ │ │ │ │ ├── DixieExceptionChaosProvider.h │ │ │ │ └── DixieExceptionChaosProvider.m │ │ │ ├── NilChaosProvider/ │ │ │ │ ├── DixieNilChaosProvider.h │ │ │ │ └── DixieNilChaosProvider.m │ │ │ ├── NonChaosProvider/ │ │ │ │ ├── DixieNonChaosProvider.h │ │ │ │ └── DixieNonChaosProvider.m │ │ │ ├── RandomChaosProvider/ │ │ │ │ ├── DixieRandomChaosProvider.h │ │ │ │ └── DixieRandomChaosProvider.m │ │ │ └── SequentialChaosProvider/ │ │ │ ├── DixieSequentialChaosProvider.h │ │ │ └── DixieSequentialChaosProvider.m │ │ ├── Dixie+Fluent/ │ │ │ ├── Dixie+Fluent.h │ │ │ └── Dixie+Fluent.m │ │ ├── Dixie.h │ │ ├── Dixie.m │ │ ├── DixieHeaders.h │ │ ├── DixieLogger/ │ │ │ ├── DixieLogger.h │ │ │ ├── DixieLogger.m │ │ │ └── SimpleLogger/ │ │ │ ├── DixieSimpleLogger.h │ │ │ └── DixieSimpleLogger.m │ │ ├── MethodInfo/ │ │ │ ├── DixieMethodInfo.h │ │ │ └── DixieMethodInfo.m │ │ ├── ParamProvider/ │ │ │ ├── DixieBaseParamProvider.h │ │ │ ├── DixieBaseParamProvider.m │ │ │ └── RandomParamProvider/ │ │ │ ├── DixieRandomParamProvider.h │ │ │ └── DixieRandomParamProvider.m │ │ ├── ProfileEntry/ │ │ │ ├── DixieProfileEntry.h │ │ │ └── DixieProfileEntry.m │ │ ├── PuppetMaker/ │ │ │ ├── DixieDefaultPuppetMaker.h │ │ │ ├── DixieDefaultPuppetMaker.m │ │ │ └── DixiePuppetMaking.h │ │ └── Runtime/ │ │ ├── DixieCallEnvironment.h │ │ ├── DixieCallEnvironment.m │ │ ├── DixieRunTimeHelper.h │ │ ├── DixieRunTimeHelper.m │ │ ├── NSObject+DixieRunTimeHelper.h │ │ └── NSObject+DixieRunTimeHelper.m │ ├── Dixie.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ ├── Dixie.xcscheme │ │ └── DixieTests.xcscheme │ └── DixieTests/ │ ├── Helpers/ │ │ ├── ChaosProviderTestClass.h │ │ ├── ChaosProviderTestClass.m │ │ ├── SubTestClass.h │ │ ├── SubTestClass.m │ │ ├── TestClass.h │ │ ├── TestClass.m │ │ ├── TestPuppetMaker.h │ │ └── TestPuppetMaker.m │ ├── Info.plist │ ├── Predefined profiles/ │ │ ├── NSDateProfile.h │ │ ├── NSDateProfile.m │ │ ├── NSURLConnectionProfile.h │ │ ├── NSURLConnectionProfile.m │ │ ├── NSURLProfile.h │ │ └── NSURLProfile.m │ └── Units/ │ ├── DixieAPITests.m │ ├── DixieChaosProviderTests.m │ ├── ProfileEntryTests.m │ ├── RandomParamProviderTests.m │ └── RunTimeHelperTests.m ├── Dixie.podspec ├── DixieBasicChaos.codesnippet ├── DixieExampleApp/ │ ├── DixieExampleApp/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.xib │ │ │ └── Main.storyboard │ │ ├── CountDownViewController.h │ │ ├── CountDownViewController.m │ │ ├── Images.xcassets/ │ │ │ └── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── MapViewController.h │ │ ├── MapViewController.m │ │ ├── WeatherModel.h │ │ ├── WeatherModel.m │ │ ├── WeatherViewController.h │ │ ├── WeatherViewController.m │ │ └── main.m │ ├── DixieExampleApp.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ ├── DixieExampleApp.xcworkspace/ │ │ └── contents.xcworkspacedata │ └── Podfile ├── Documentation/ │ ├── docset/ │ │ └── Contents/ │ │ ├── Info.plist │ │ └── Resources/ │ │ ├── Documents/ │ │ │ ├── Blocks/ │ │ │ │ ├── DixieCustomChaosBlock.html │ │ │ │ └── DixieImplementationBlock.html │ │ │ ├── Categories/ │ │ │ │ └── NSObject+DixieRunTimeHelper.html │ │ │ ├── Classes/ │ │ │ │ ├── Dixie.html │ │ │ │ ├── DixieBaseChaosProvider.html │ │ │ │ ├── DixieBaseParamProvider.html │ │ │ │ ├── DixieBlockChaosProvider.html │ │ │ │ ├── DixieCallEnvironment.html │ │ │ │ ├── DixieChaosContext.html │ │ │ │ ├── DixieCompositeChaosProvider.html │ │ │ │ ├── DixieCompositeCondition.html │ │ │ │ ├── DixieConstantChaosProvider.html │ │ │ │ ├── DixieDefaultPuppetMaker.html │ │ │ │ ├── DixieExceptionChaosProvider.html │ │ │ │ ├── DixieLogger.html │ │ │ │ ├── DixieMethodInfo.html │ │ │ │ ├── DixieNilChaosProvider.html │ │ │ │ ├── DixieNonChaosProvider.html │ │ │ │ ├── DixieProfileEntry.html │ │ │ │ ├── DixieRandomChaosProvider.html │ │ │ │ ├── DixieRandomParamProvider.html │ │ │ │ ├── DixieRunTimeHelper.html │ │ │ │ ├── DixieSequentialChaosProvider.html │ │ │ │ └── DixieSimpleLogger.html │ │ │ ├── Protocols/ │ │ │ │ └── DixiePuppetMaking.html │ │ │ ├── css/ │ │ │ │ ├── styles.css │ │ │ │ └── stylesPrint.css │ │ │ ├── hierarchy.html │ │ │ └── index.html │ │ ├── Nodes.xml │ │ ├── Tokens1.xml │ │ ├── Tokens10.xml │ │ ├── Tokens11.xml │ │ ├── Tokens12.xml │ │ ├── Tokens13.xml │ │ ├── Tokens14.xml │ │ ├── Tokens15.xml │ │ ├── Tokens16.xml │ │ ├── Tokens17.xml │ │ ├── Tokens18.xml │ │ ├── Tokens19.xml │ │ ├── Tokens2.xml │ │ ├── Tokens20.xml │ │ ├── Tokens21.xml │ │ ├── Tokens22.xml │ │ ├── Tokens23.xml │ │ ├── Tokens24.xml │ │ ├── Tokens25.xml │ │ ├── Tokens3.xml │ │ ├── Tokens4.xml │ │ ├── Tokens5.xml │ │ ├── Tokens6.xml │ │ ├── Tokens7.xml │ │ ├── Tokens8.xml │ │ ├── Tokens9.xml │ │ ├── docSet.dsidx │ │ ├── docSet.dsidx-shm │ │ ├── docSet.dsidx-wal │ │ ├── docSet.mom │ │ ├── docSet.skidx │ │ ├── docSet.toc │ │ └── docSet.tokencache │ ├── docset-installed.txt │ └── html/ │ ├── Blocks/ │ │ ├── DixieCustomChaosBlock.html │ │ └── DixieImplementationBlock.html │ ├── Categories/ │ │ └── NSObject+DixieRunTimeHelper.html │ ├── Classes/ │ │ ├── Dixie.html │ │ ├── DixieBaseChaosProvider.html │ │ ├── DixieBaseParamProvider.html │ │ ├── DixieBlockChaosProvider.html │ │ ├── DixieCallEnvironment.html │ │ ├── DixieChaosContext.html │ │ ├── DixieCompositeChaosProvider.html │ │ ├── DixieCompositeCondition.html │ │ ├── DixieConstantChaosProvider.html │ │ ├── DixieDefaultPuppetMaker.html │ │ ├── DixieExceptionChaosProvider.html │ │ ├── DixieLogger.html │ │ ├── DixieMethodInfo.html │ │ ├── DixieNilChaosProvider.html │ │ ├── DixieNonChaosProvider.html │ │ ├── DixieProfileEntry.html │ │ ├── DixieRandomChaosProvider.html │ │ ├── DixieRandomParamProvider.html │ │ ├── DixieRunTimeHelper.html │ │ ├── DixieSequentialChaosProvider.html │ │ └── DixieSimpleLogger.html │ ├── Protocols/ │ │ └── DixiePuppetMaking.html │ ├── css/ │ │ ├── styles.css │ │ └── stylesPrint.css │ ├── hierarchy.html │ └── index.html ├── LICENSE ├── README.md ├── deploy_docs.sh └── documentation.sh
SYMBOL INDEX (2 symbols across 2 files)
FILE: DixieExampleApp/DixieExampleApp/CountDownViewController.h
function interface (line 17) | interface CountDownViewController : UIViewController {
FILE: DixieExampleApp/DixieExampleApp/MapViewController.h
function interface (line 19) | interface MapViewController : UIViewController <CLLocationManagerDelegat...
Condensed preview — 193 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,169K chars).
[
{
"path": ".gitignore",
"chars": 505,
"preview": "build/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspec"
},
{
"path": ".travis.yml",
"chars": 233,
"preview": "language: objective-c\nscript:\n - xctool -project Dixie/Dixie.xcodeproj -scheme Dixie -sdk iphonesimulator ONLY_ACTIVE_A"
},
{
"path": "CONTRIBUTING.md",
"chars": 3582,
"preview": "# Contributing to Dixie\n\nIf you would like to contribute code you can do so through GitHub by forking the repository and"
},
{
"path": "Dixie/Dixie/ChaosProvider/BlockChaosProvider/DixieBlockChaosProvider.h",
"chars": 1546,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/BlockChaosProvider/DixieBlockChaosProvider.m",
"chars": 1096,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeChaosProvider.h",
"chars": 1105,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeChaosProvider.m",
"chars": 1781,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeCondition.h",
"chars": 1632,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/CompositeChaosProvider/DixieCompositeCondition.m",
"chars": 1155,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/ConstantChaosProvider/DixieConstantChaosProvider.h",
"chars": 1093,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/ConstantChaosProvider/DixieConstantChaosProvider.m",
"chars": 1525,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/DixieBaseChaosProvider.h",
"chars": 1701,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/DixieBaseChaosProvider.m",
"chars": 2312,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/DixieChaosContext.h",
"chars": 1430,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/DixieChaosContext.m",
"chars": 1011,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/ExceptionChaosProvider/DixieExceptionChaosProvider.h",
"chars": 1076,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/ExceptionChaosProvider/DixieExceptionChaosProvider.m",
"chars": 1089,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/NilChaosProvider/DixieNilChaosProvider.h",
"chars": 784,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/NilChaosProvider/DixieNilChaosProvider.m",
"chars": 805,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/NonChaosProvider/DixieNonChaosProvider.h",
"chars": 740,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/NonChaosProvider/DixieNonChaosProvider.m",
"chars": 952,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/RandomChaosProvider/DixieRandomChaosProvider.h",
"chars": 1129,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/RandomChaosProvider/DixieRandomChaosProvider.m",
"chars": 1330,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/SequentialChaosProvider/DixieSequentialChaosProvider.h",
"chars": 1220,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ChaosProvider/SequentialChaosProvider/DixieSequentialChaosProvider.m",
"chars": 2282,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Dixie+Fluent/Dixie+Fluent.h",
"chars": 1235,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Dixie+Fluent/Dixie+Fluent.m",
"chars": 1568,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Dixie.h",
"chars": 1811,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Dixie.m",
"chars": 2209,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/DixieHeaders.h",
"chars": 1006,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/DixieLogger/DixieLogger.h",
"chars": 1063,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/DixieLogger/DixieLogger.m",
"chars": 1240,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/DixieLogger/SimpleLogger/DixieSimpleLogger.h",
"chars": 751,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/DixieLogger/SimpleLogger/DixieSimpleLogger.m",
"chars": 1042,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/MethodInfo/DixieMethodInfo.h",
"chars": 1426,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/MethodInfo/DixieMethodInfo.m",
"chars": 1548,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ParamProvider/DixieBaseParamProvider.h",
"chars": 803,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ParamProvider/DixieBaseParamProvider.m",
"chars": 931,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ParamProvider/RandomParamProvider/DixieRandomParamProvider.h",
"chars": 1175,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ParamProvider/RandomParamProvider/DixieRandomParamProvider.m",
"chars": 5326,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ProfileEntry/DixieProfileEntry.h",
"chars": 3018,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/ProfileEntry/DixieProfileEntry.m",
"chars": 2474,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/PuppetMaker/DixieDefaultPuppetMaker.h",
"chars": 789,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/PuppetMaker/DixieDefaultPuppetMaker.m",
"chars": 2935,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/PuppetMaker/DixiePuppetMaking.h",
"chars": 1324,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Runtime/DixieCallEnvironment.h",
"chars": 1183,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Runtime/DixieCallEnvironment.m",
"chars": 831,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Runtime/DixieRunTimeHelper.h",
"chars": 3166,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Runtime/DixieRunTimeHelper.m",
"chars": 13048,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Runtime/NSObject+DixieRunTimeHelper.h",
"chars": 1157,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie/Runtime/NSObject+DixieRunTimeHelper.m",
"chars": 2807,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/Dixie.xcodeproj/project.pbxproj",
"chars": 43669,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Dixie/Dixie.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 150,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:Dixie.xcodeproj"
},
{
"path": "Dixie/Dixie.xcodeproj/xcshareddata/xcschemes/Dixie.xcscheme",
"chars": 2723,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0630\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "Dixie/Dixie.xcodeproj/xcshareddata/xcschemes/DixieTests.xcscheme",
"chars": 3545,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0630\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "Dixie/DixieTests/Helpers/ChaosProviderTestClass.h",
"chars": 1669,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Helpers/ChaosProviderTestClass.m",
"chars": 2002,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Helpers/SubTestClass.h",
"chars": 793,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Helpers/SubTestClass.m",
"chars": 708,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Helpers/TestClass.h",
"chars": 932,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Helpers/TestClass.m",
"chars": 949,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Helpers/TestPuppetMaker.h",
"chars": 776,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Helpers/TestPuppetMaker.m",
"chars": 1000,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Info.plist",
"chars": 754,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Dixie/DixieTests/Predefined profiles/NSDateProfile.h",
"chars": 853,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Predefined profiles/NSDateProfile.m",
"chars": 896,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Predefined profiles/NSURLConnectionProfile.h",
"chars": 865,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Predefined profiles/NSURLConnectionProfile.m",
"chars": 874,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Predefined profiles/NSURLProfile.h",
"chars": 842,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Predefined profiles/NSURLProfile.m",
"chars": 862,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Units/DixieAPITests.m",
"chars": 4249,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Units/DixieChaosProviderTests.m",
"chars": 16087,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Units/ProfileEntryTests.m",
"chars": 3336,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Units/RandomParamProviderTests.m",
"chars": 2395,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie/DixieTests/Units/RunTimeHelperTests.m",
"chars": 10516,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "Dixie.podspec",
"chars": 750,
"preview": "Pod::Spec.new do |s|\n\n s.name = \"Dixie\"\n s.version = \"1.0\"\n s.summary = \"An alternative mocking fra"
},
{
"path": "DixieBasicChaos.codesnippet",
"chars": 1002,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DixieExampleApp/DixieExampleApp/AppDelegate.h",
"chars": 281,
"preview": "//\n// AppDelegate.h\n// WhenIsWWDC\n//\n// Created by Skyscanner on 15/05/15.\n// Copyright (c) 2015 Skyscanner. All rig"
},
{
"path": "DixieExampleApp/DixieExampleApp/AppDelegate.m",
"chars": 818,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/Base.lproj/LaunchScreen.xib",
"chars": 5006,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "DixieExampleApp/DixieExampleApp/Base.lproj/Main.storyboard",
"chars": 52525,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "DixieExampleApp/DixieExampleApp/CountDownViewController.h",
"chars": 995,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/CountDownViewController.m",
"chars": 3668,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 813,
"preview": "{\n \"images\" : [\n {\n \"size\" : \"29x29\",\n \"idiom\" : \"iphone\",\n \"filename\" : \"Icon-Small@2x.png\",\n \""
},
{
"path": "DixieExampleApp/DixieExampleApp/Info.plist",
"chars": 1436,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DixieExampleApp/DixieExampleApp/MapViewController.h",
"chars": 1071,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/MapViewController.m",
"chars": 6198,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/WeatherModel.h",
"chars": 955,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/WeatherModel.m",
"chars": 1971,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/WeatherViewController.h",
"chars": 1079,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/WeatherViewController.m",
"chars": 5052,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp/main.m",
"chars": 803,
"preview": "//\n// Dixie\n// Copyright 2015 Skyscanner Limited\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); y"
},
{
"path": "DixieExampleApp/DixieExampleApp.xcodeproj/project.pbxproj",
"chars": 22999,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "DixieExampleApp/DixieExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 160,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:DixieExampleApp"
},
{
"path": "DixieExampleApp/DixieExampleApp.xcworkspace/contents.xcworkspacedata",
"chars": 233,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:DixieExampleAp"
},
{
"path": "DixieExampleApp/Podfile",
"chars": 145,
"preview": "# Uncomment this line to define a global platform for your project\n# platform :ios, '6.0'\n\ntarget 'DixieExampleApp' do\n\n"
},
{
"path": "Documentation/docset/Contents/Info.plist",
"chars": 947,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Blocks/DixieCustomChaosBlock.html",
"chars": 6247,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCus"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Blocks/DixieImplementationBlock.html",
"chars": 6236,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieImp"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Categories/NSObject+DixieRunTimeHelper.html",
"chars": 5959,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>NSObject"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/Dixie.html",
"chars": 16448,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>Dixie Cl"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieBaseChaosProvider.html",
"chars": 11618,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieBas"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieBaseParamProvider.html",
"chars": 8005,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieBas"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieBlockChaosProvider.html",
"chars": 11052,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieBlo"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieCallEnvironment.html",
"chars": 11290,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCal"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieChaosContext.html",
"chars": 12910,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCha"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieCompositeChaosProvider.html",
"chars": 11110,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCom"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieCompositeCondition.html",
"chars": 13090,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCom"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieConstantChaosProvider.html",
"chars": 12552,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCon"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieDefaultPuppetMaker.html",
"chars": 10317,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieDef"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieExceptionChaosProvider.html",
"chars": 12547,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieExc"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieLogger.html",
"chars": 11055,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieLog"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieMethodInfo.html",
"chars": 14722,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieMet"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieNilChaosProvider.html",
"chars": 8841,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieNil"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieNonChaosProvider.html",
"chars": 8078,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieNon"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieProfileEntry.html",
"chars": 18017,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixiePro"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieRandomChaosProvider.html",
"chars": 11225,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieRan"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieRandomParamProvider.html",
"chars": 11774,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieRan"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieRunTimeHelper.html",
"chars": 23806,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieRun"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieSequentialChaosProvider.html",
"chars": 11293,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieSeq"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Classes/DixieSimpleLogger.html",
"chars": 8214,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieSim"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/Protocols/DixiePuppetMaking.html",
"chars": 10170,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixiePup"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/css/styles.css",
"chars": 9176,
"preview": "body {\n\tfont-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;\n\tfont-size: 13px;\n}\n\ncode {\n\tfont-family: Courie"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/css/stylesPrint.css",
"chars": 304,
"preview": "\nheader {\n\tdisplay: none;\n}\n\ndiv.main-navigation, div.navigation-top {\n\tdisplay: none;\n}\n\ndiv#overview_contents, div#con"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/hierarchy.html",
"chars": 4515,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title>Dixie Hi"
},
{
"path": "Documentation/docset/Contents/Resources/Documents/index.html",
"chars": 4688,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title>Dixie Re"
},
{
"path": "Documentation/docset/Contents/Resources/Nodes.xml",
"chars": 27583,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<DocSetNodes version=\"1.0\">\n <TOC>\n <Node type=\"folder\">\n <N"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens1.xml",
"chars": 3911,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/Dixie.html\">\n\t\t\n\t\t<Token>\n\t\t\t<TokenId"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens10.xml",
"chars": 1890,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieDefaultPuppetMaker.html\">\n\t\t\n\t\t<"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens11.xml",
"chars": 3200,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieExceptionChaosProvider.html\">\n\t\t"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens12.xml",
"chars": 1857,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieLogger.html\">\n\t\t\n\t\t<Token>\n\t\t\t<T"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens13.xml",
"chars": 7090,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieMethodInfo.html\">\n\t\t\n\t\t<Token>\n\t"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens14.xml",
"chars": 1304,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieNilChaosProvider.html\">\n\t\t\n\t\t<To"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens15.xml",
"chars": 869,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieNonChaosProvider.html\">\n\t\t\n\t\t<To"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens16.xml",
"chars": 7900,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieProfileEntry.html\">\n\t\t\n\t\t<Token>"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens17.xml",
"chars": 2072,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieRandomChaosProvider.html\">\n\t\t\n\t\t"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens18.xml",
"chars": 2166,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieRandomParamProvider.html\">\n\t\t\n\t\t"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens19.xml",
"chars": 7596,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieRunTimeHelper.html\">\n\t\t\n\t\t<Token"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens2.xml",
"chars": 2719,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieBaseChaosProvider.html\">\n\t\t\n\t\t<T"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens20.xml",
"chars": 2234,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieSequentialChaosProvider.html\">\n\t"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens21.xml",
"chars": 964,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieSimpleLogger.html\">\n\t\t\n\t\t<Token>"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens22.xml",
"chars": 533,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Categories/NSObject+DixieRunTimeHelper.html\">"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens23.xml",
"chars": 1871,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Protocols/DixiePuppetMaking.html\">\n\t\t\n\t\t<Toke"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens24.xml",
"chars": 120,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"\">\n\t\t\n\t\t\n \n \n\t</File>\n</Tokens>"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens25.xml",
"chars": 120,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"\">\n\t\t\n\t\t\n \n \n\t</File>\n</Tokens>"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens3.xml",
"chars": 864,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieBaseParamProvider.html\">\n\t\t\n\t\t<T"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens4.xml",
"chars": 2024,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieBlockChaosProvider.html\">\n\t\t\n\t\t<"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens5.xml",
"chars": 3601,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieCallEnvironment.html\">\n\t\t\n\t\t<Tok"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens6.xml",
"chars": 4973,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieChaosContext.html\">\n\t\t\n\t\t<Token>"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens7.xml",
"chars": 2073,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieCompositeChaosProvider.html\">\n\t\t"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens8.xml",
"chars": 5241,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieCompositeCondition.html\">\n\t\t\n\t\t<"
},
{
"path": "Documentation/docset/Contents/Resources/Tokens9.xml",
"chars": 3191,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Tokens version=\"1.0\">\n\t<File path=\"Classes/DixieConstantChaosProvider.html\">\n\t\t\n"
},
{
"path": "Documentation/docset-installed.txt",
"chars": 181,
"preview": "Documentation set was installed to Xcode!\n\nPath: /Users/peterwiesner/Library/Developer/Shared/Documentation/DocSets/com."
},
{
"path": "Documentation/html/Blocks/DixieCustomChaosBlock.html",
"chars": 6247,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCus"
},
{
"path": "Documentation/html/Blocks/DixieImplementationBlock.html",
"chars": 6236,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieImp"
},
{
"path": "Documentation/html/Categories/NSObject+DixieRunTimeHelper.html",
"chars": 5959,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>NSObject"
},
{
"path": "Documentation/html/Classes/Dixie.html",
"chars": 16448,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>Dixie Cl"
},
{
"path": "Documentation/html/Classes/DixieBaseChaosProvider.html",
"chars": 11618,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieBas"
},
{
"path": "Documentation/html/Classes/DixieBaseParamProvider.html",
"chars": 8005,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieBas"
},
{
"path": "Documentation/html/Classes/DixieBlockChaosProvider.html",
"chars": 11052,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieBlo"
},
{
"path": "Documentation/html/Classes/DixieCallEnvironment.html",
"chars": 11290,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCal"
},
{
"path": "Documentation/html/Classes/DixieChaosContext.html",
"chars": 12910,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCha"
},
{
"path": "Documentation/html/Classes/DixieCompositeChaosProvider.html",
"chars": 11110,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCom"
},
{
"path": "Documentation/html/Classes/DixieCompositeCondition.html",
"chars": 13090,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCom"
},
{
"path": "Documentation/html/Classes/DixieConstantChaosProvider.html",
"chars": 12552,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieCon"
},
{
"path": "Documentation/html/Classes/DixieDefaultPuppetMaker.html",
"chars": 10317,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieDef"
},
{
"path": "Documentation/html/Classes/DixieExceptionChaosProvider.html",
"chars": 12547,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieExc"
},
{
"path": "Documentation/html/Classes/DixieLogger.html",
"chars": 11055,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieLog"
},
{
"path": "Documentation/html/Classes/DixieMethodInfo.html",
"chars": 14722,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieMet"
},
{
"path": "Documentation/html/Classes/DixieNilChaosProvider.html",
"chars": 8841,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieNil"
},
{
"path": "Documentation/html/Classes/DixieNonChaosProvider.html",
"chars": 8078,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieNon"
},
{
"path": "Documentation/html/Classes/DixieProfileEntry.html",
"chars": 18017,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixiePro"
},
{
"path": "Documentation/html/Classes/DixieRandomChaosProvider.html",
"chars": 11225,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieRan"
},
{
"path": "Documentation/html/Classes/DixieRandomParamProvider.html",
"chars": 11774,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieRan"
},
{
"path": "Documentation/html/Classes/DixieRunTimeHelper.html",
"chars": 23806,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieRun"
},
{
"path": "Documentation/html/Classes/DixieSequentialChaosProvider.html",
"chars": 11293,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieSeq"
},
{
"path": "Documentation/html/Classes/DixieSimpleLogger.html",
"chars": 8214,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixieSim"
},
{
"path": "Documentation/html/Protocols/DixiePuppetMaking.html",
"chars": 10170,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"html/html; charset=utf-8\" />\n\t\t<title>DixiePup"
},
{
"path": "Documentation/html/css/styles.css",
"chars": 9176,
"preview": "body {\n\tfont-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;\n\tfont-size: 13px;\n}\n\ncode {\n\tfont-family: Courie"
},
{
"path": "Documentation/html/css/stylesPrint.css",
"chars": 304,
"preview": "\nheader {\n\tdisplay: none;\n}\n\ndiv.main-navigation, div.navigation-top {\n\tdisplay: none;\n}\n\ndiv#overview_contents, div#con"
},
{
"path": "Documentation/html/hierarchy.html",
"chars": 4515,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title>Dixie Hi"
},
{
"path": "Documentation/html/index.html",
"chars": 4688,
"preview": "<!DOCTYPE HTML>\n<html>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<title>Dixie Re"
},
{
"path": "LICENSE",
"chars": 9270,
"preview": "Apache License\n==============\n\n_Version 2.0, January 2004_ \n_<<http://www.apache.org/licenses/>>_\n\n### Terms and "
},
{
"path": "README.md",
"chars": 10968,
"preview": "Dixie\n===\n<img src=\"/Logo.png?raw=true\" alt=\"Dixie\" width=\"100px\" height=\"auto\">\n\nDixie is an open source Objective-C te"
},
{
"path": "deploy_docs.sh",
"chars": 470,
"preview": "#!/bin/bash\n\necho \"[DOCSCRIPT] Updating gh-pages branch...\"\ngit checkout master\ngit branch -D gh-pages\ngit branch gh-pag"
},
{
"path": "documentation.sh",
"chars": 190,
"preview": "/usr/local/bin/appledoc --project-name Dixie --project-company Skyscanner --output \"./Documentation/\" --logformat xcode "
}
]
// ... and 7 more files (download for full content)
About this extraction
This page contains the full source code of the Skyscanner/Dixie GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 193 files (1004.8 KB), approximately 281.5k tokens, and a symbol index with 2 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.