xcfit 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.swift-version +1 -0
- data/.travis.yml +13 -13
- data/README.md +57 -35
- data/XCFit.podspec +6 -16
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +14 -12
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +16 -15
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +11 -11
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +5 -5
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +9 -8
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +7 -6
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +7 -5
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +10 -8
- data/homebrew/xcfit +155 -0
- data/lib/XCFit/version.rb +1 -1
- metadata +15 -177
- data/XCFit/Classes/.gitkeep +0 -0
- data/XCFit/Classes/CliSwift.swift +0 -87
- data/XCFit/Classes/CopyDir.swift +0 -26
- data/XCFit/Classes/Cucumberish/Core/CCIBlockDefinitions.h +0 -400
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.h +0 -72
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.m +0 -141
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.h +0 -51
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.m +0 -245
- data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.h +0 -62
- data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.m +0 -117
- data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.h +0 -37
- data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.m +0 -37
- data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.h +0 -46
- data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.m +0 -117
- data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.h +0 -89
- data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.m +0 -128
- data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.h +0 -49
- data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.m +0 -174
- data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.h +0 -36
- data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.m +0 -34
- data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.h +0 -61
- data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.m +0 -91
- data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.h +0 -97
- data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.m +0 -224
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.h +0 -85
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.m +0 -98
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.h +0 -43
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.m +0 -65
- data/XCFit/Classes/Cucumberish/Cucumberish.h +0 -133
- data/XCFit/Classes/Cucumberish/Cucumberish.m +0 -604
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.h +0 -15
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.m +0 -312
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.h +0 -20
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.m +0 -79
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.h +0 -11
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.m +0 -27
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.m +0 -30
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.m +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.h +0 -24
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.m +0 -49
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.h +0 -24
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.m +0 -50
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.h +0 -25
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.m +0 -64
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.m +0 -124
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProviderProtocol.h +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.m +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.h +0 -17
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.m +0 -179
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineProtocol.h +0 -64
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.m +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasDescriptionProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasLocationProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasRowsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasStepsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasTagsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.m +0 -41
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.h +0 -4
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.m +0 -5
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.h +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.h +0 -132
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.m +0 -2735
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.h +0 -55
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.m +0 -192
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.h +0 -23
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.m +0 -41
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition_Private.h +0 -6
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.h +0 -15
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.m +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.h +0 -16
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.m +0 -35
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.h +0 -4
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.m +0 -5
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.m +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.h +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.m +0 -50
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.h +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.m +0 -283
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.m +0 -59
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.h +0 -7
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/gherkin-languages.json +0 -2969
- data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.h +0 -24
- data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.m +0 -44
- data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.h +0 -7
- data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.m +0 -83
- data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.h +0 -32
- data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.m +0 -70
- data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
- data/XCFit_Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -134
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -17
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -13
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___POD_NAME___.m +0 -25
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/AcceptanceTests-Bridging-Header.h +0 -1
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift +0 -35
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/SlimTables.h +0 -28
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/TemplateInfo.plist +0 -155
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -12
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -33
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +0 -41
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +0 -92
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +0 -58
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +0 -28
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +0 -26
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateInfo.plist +0 -159
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -15
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.h +0 -23
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -28
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -37
- data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
- data/Xcode7-Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/BaseScreen.swift +0 -42
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/Extensions.swift +0 -60
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeElements.swift +0 -31
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeProtocol.swift +0 -25
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreenTest.swift +0 -30
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/ProtocolOrientedTest.swift +0 -45
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateInfo.plist +0 -141
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___TestBase.swift +0 -30
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon-old.icns +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon-old.icns +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateInfo.plist +0 -59
- data/Xcode7-Templates/XCFit/iOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/iOS XCUI POM Test Bundle.xctemplate/TemplateInfo.plist +0 -39
@@ -1,91 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// CCILocation.m
|
3
|
-
//
|
4
|
-
// Created by Ahmed Ali on 2/1/2016
|
5
|
-
// Copyright © 2016 Ahmed Ali. All rights reserved.
|
6
|
-
//
|
7
|
-
//
|
8
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
// of this software and associated documentation files (the "Software"), to deal
|
10
|
-
// in the Software without restriction, including without limitation the rights
|
11
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
-
// copies of the Software, and to permit persons to whom the Software is
|
13
|
-
// furnished to do so, subject to the following conditions:
|
14
|
-
//
|
15
|
-
// The above copyright notice and this permission notice shall be included in
|
16
|
-
// all copies or substantial portions of the Software.
|
17
|
-
//
|
18
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
// THE SOFTWARE. Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
#import "CCILocation.h"
|
29
|
-
|
30
|
-
@interface CCILocation ()
|
31
|
-
@end
|
32
|
-
@implementation CCILocation
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Instantiate the instance using the passed dictionary values to set the properties values
|
39
|
-
*/
|
40
|
-
|
41
|
-
-(instancetype)initWithDictionary:(NSDictionary *)dictionary
|
42
|
-
{
|
43
|
-
self = [super init];
|
44
|
-
if(dictionary[@"filePath"] != nil && ![dictionary[@"filePath"] isKindOfClass:[NSNull class]]){
|
45
|
-
self.filePath = dictionary[@"filePath"];
|
46
|
-
}
|
47
|
-
|
48
|
-
if(dictionary[@"line"] != nil && ![dictionary[@"line"] isKindOfClass:[NSNull class]]){
|
49
|
-
self.line = [dictionary[@"line"] integerValue];
|
50
|
-
}
|
51
|
-
|
52
|
-
return self;
|
53
|
-
}
|
54
|
-
|
55
|
-
|
56
|
-
/**
|
57
|
-
* Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
|
58
|
-
*/
|
59
|
-
-(NSDictionary *)toDictionary
|
60
|
-
{
|
61
|
-
NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
|
62
|
-
dictionary[@"filePath"] = self.filePath;
|
63
|
-
dictionary[@"line"] = @(self.line);
|
64
|
-
return dictionary;
|
65
|
-
|
66
|
-
}
|
67
|
-
|
68
|
-
/**
|
69
|
-
* Implementation of NSCoding encoding method
|
70
|
-
*/
|
71
|
-
/**
|
72
|
-
* Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
|
73
|
-
*/
|
74
|
-
- (void)encodeWithCoder:(NSCoder *)aCoder
|
75
|
-
{
|
76
|
-
[aCoder encodeObject:self.filePath forKey:@"filePath"];
|
77
|
-
[aCoder encodeObject:@(self.line) forKey:@"line"];
|
78
|
-
}
|
79
|
-
|
80
|
-
/**
|
81
|
-
* Implementation of NSCoding initWithCoder: method
|
82
|
-
*/
|
83
|
-
- (instancetype)initWithCoder:(NSCoder *)aDecoder
|
84
|
-
{
|
85
|
-
self = [super init];
|
86
|
-
self.filePath = [aDecoder decodeObjectForKey:@"filePath"];
|
87
|
-
self.line = [[aDecoder decodeObjectForKey:@"line"] integerValue];
|
88
|
-
return self;
|
89
|
-
|
90
|
-
}
|
91
|
-
@end
|
@@ -1,97 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// CCIScenarioDefinition.h
|
3
|
-
//
|
4
|
-
// Created by Ahmed Ali on 17/1/2016
|
5
|
-
// Copyright © 2016 Ahmed Ali. All rights reserved.
|
6
|
-
//
|
7
|
-
//
|
8
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
// of this software and associated documentation files (the "Software"), to deal
|
10
|
-
// in the Software without restriction, including without limitation the rights
|
11
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
-
// copies of the Software, and to permit persons to whom the Software is
|
13
|
-
// furnished to do so, subject to the following conditions:
|
14
|
-
//
|
15
|
-
// The above copyright notice and this permission notice shall be included in
|
16
|
-
// all copies or substantial portions of the Software.
|
17
|
-
//
|
18
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
// THE SOFTWARE.
|
25
|
-
|
26
|
-
// Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
|
27
|
-
|
28
|
-
#import <Foundation/Foundation.h>
|
29
|
-
#import "CCIExample.h"
|
30
|
-
#import "CCIStep.h"
|
31
|
-
/**
|
32
|
-
Represents one scenario or one outline with its example found in your .feature file
|
33
|
-
*/
|
34
|
-
@interface CCIScenarioDefinition : NSObject <NSCopying>
|
35
|
-
|
36
|
-
/**
|
37
|
-
Array of found examples in case it is an outline
|
38
|
-
*/
|
39
|
-
@property (nonatomic, strong) NSArray<CCIExample *> * examples;
|
40
|
-
|
41
|
-
/**
|
42
|
-
Keyword is usually Scenario or Scenario Outline
|
43
|
-
*/
|
44
|
-
@property (nonatomic, copy) NSString * keyword;
|
45
|
-
|
46
|
-
/**
|
47
|
-
The location of this scenario in its file
|
48
|
-
*/
|
49
|
-
@property (nonatomic, strong) CCILocation * location;
|
50
|
-
|
51
|
-
/**
|
52
|
-
The name of the scenario
|
53
|
-
*/
|
54
|
-
@property (nonatomic, copy) NSString * name;
|
55
|
-
|
56
|
-
/**
|
57
|
-
Array of steps the defines the scenario, in the same order they originally found in the scenario
|
58
|
-
*/
|
59
|
-
@property (nonatomic, strong) NSArray <CCIStep *> * steps;
|
60
|
-
|
61
|
-
/**
|
62
|
-
Array of tags found on top of this scenario
|
63
|
-
*/
|
64
|
-
@property (nonatomic, strong) NSArray <NSString *> * tags;
|
65
|
-
|
66
|
-
/**
|
67
|
-
Can be Scenario or ScenarioOutline
|
68
|
-
*/
|
69
|
-
@property (nonatomic, copy) NSString * type;
|
70
|
-
|
71
|
-
|
72
|
-
/**
|
73
|
-
In case the execution of this scenario is failed, this property will have the failure message
|
74
|
-
*/
|
75
|
-
@property (nonatomic, strong) NSString * failureReason;
|
76
|
-
|
77
|
-
/**
|
78
|
-
Bool determines the success or failure of the scenario.
|
79
|
-
*/
|
80
|
-
@property (nonatomic, assign) BOOL success;
|
81
|
-
|
82
|
-
/**
|
83
|
-
Creates an instance with properties filled from the passed dictionary
|
84
|
-
|
85
|
-
@param dictionary the dictionary that contains all the scenario data
|
86
|
-
|
87
|
-
@return scenario instance
|
88
|
-
*/
|
89
|
-
-(instancetype)initWithDictionary:(NSDictionary *)dictionary;
|
90
|
-
|
91
|
-
/**
|
92
|
-
Creates a dictionary from the class properties
|
93
|
-
|
94
|
-
@return the created dictionary
|
95
|
-
*/
|
96
|
-
-(NSDictionary *)toDictionary;
|
97
|
-
@end
|
@@ -1,224 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// CCIScenarioDefinition.m
|
3
|
-
//
|
4
|
-
// Created by Ahmed Ali on 17/1/2016
|
5
|
-
// Copyright © 2016 Ahmed Ali. All rights reserved.
|
6
|
-
//
|
7
|
-
//
|
8
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
// of this software and associated documentation files (the "Software"), to deal
|
10
|
-
// in the Software without restriction, including without limitation the rights
|
11
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
-
// copies of the Software, and to permit persons to whom the Software is
|
13
|
-
// furnished to do so, subject to the following conditions:
|
14
|
-
//
|
15
|
-
// The above copyright notice and this permission notice shall be included in
|
16
|
-
// all copies or substantial portions of the Software.
|
17
|
-
//
|
18
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
// THE SOFTWARE. Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
#import "CCIScenarioDefinition.h"
|
29
|
-
|
30
|
-
@interface CCIScenarioDefinition ()
|
31
|
-
@end
|
32
|
-
@implementation CCIScenarioDefinition
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Instantiate the instance using the passed dictionary values to set the properties values
|
39
|
-
*/
|
40
|
-
|
41
|
-
-(instancetype)initWithDictionary:(NSDictionary *)dictionary
|
42
|
-
{
|
43
|
-
self = [super init];
|
44
|
-
|
45
|
-
if(dictionary[@"examples"] != nil && [dictionary[@"examples"] isKindOfClass:[NSArray class]]){
|
46
|
-
NSArray * examplesDictionaries = dictionary[@"examples"];
|
47
|
-
NSMutableArray * examplesItems = [NSMutableArray array];
|
48
|
-
for(NSDictionary * examplesDictionary in examplesDictionaries){
|
49
|
-
CCIExample * examplesItem = [[CCIExample alloc] initWithDictionary:examplesDictionary];
|
50
|
-
[examplesItems addObject:examplesItem];
|
51
|
-
}
|
52
|
-
self.examples = examplesItems;
|
53
|
-
}
|
54
|
-
if(dictionary[@"keyword"] != nil && ![dictionary[@"keyword"] isKindOfClass:[NSNull class]]){
|
55
|
-
self.keyword = dictionary[@"keyword"];
|
56
|
-
}
|
57
|
-
|
58
|
-
if(dictionary[@"location"] != nil && ![dictionary[@"location"] isKindOfClass:[NSNull class]]){
|
59
|
-
self.location = [[CCILocation alloc] initWithDictionary:dictionary[@"location"]];
|
60
|
-
}
|
61
|
-
|
62
|
-
if(dictionary[@"name"] != nil && ![dictionary[@"name"] isKindOfClass:[NSNull class]]){
|
63
|
-
self.name = dictionary[@"name"];
|
64
|
-
}
|
65
|
-
|
66
|
-
|
67
|
-
if(dictionary[@"steps"] != nil && [dictionary[@"steps"] isKindOfClass:[NSArray class]]){
|
68
|
-
NSArray * stepDictionaries = dictionary[@"steps"];
|
69
|
-
NSMutableArray * stepsItems = [NSMutableArray array];
|
70
|
-
for(NSDictionary * stepDictionary in stepDictionaries){
|
71
|
-
NSMutableDictionary * stepData = [stepDictionary mutableCopy];
|
72
|
-
if(self.location.filePath.length > 0){
|
73
|
-
stepData[@"location"][@"filePath"] = self.location.filePath;
|
74
|
-
}
|
75
|
-
CCIStep * stepsItem = [[CCIStep alloc] initWithDictionary:stepData];
|
76
|
-
[stepsItems addObject:stepsItem];
|
77
|
-
}
|
78
|
-
self.steps = stepsItems;
|
79
|
-
}
|
80
|
-
if(dictionary[@"parsedTags"] != nil){
|
81
|
-
self.tags = dictionary[@"parsedTags"];
|
82
|
-
}else if(dictionary[@"tags"] != nil && [dictionary[@"tags"] isKindOfClass:[NSArray class]]){
|
83
|
-
NSArray * tagsDictionaries = dictionary[@"tags"];
|
84
|
-
NSMutableArray * tagsItems = [NSMutableArray array];
|
85
|
-
for(NSDictionary * tagDictionary in tagsDictionaries){
|
86
|
-
NSString * tagName = tagDictionary[@"name"];
|
87
|
-
if([tagName hasPrefix:@"@"]){
|
88
|
-
tagName = [tagName stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:@""];
|
89
|
-
}
|
90
|
-
[tagsItems addObject:tagName];
|
91
|
-
|
92
|
-
}
|
93
|
-
self.tags = tagsItems;
|
94
|
-
}
|
95
|
-
|
96
|
-
if(dictionary[@"type"] != nil && ![dictionary[@"type"] isKindOfClass:[NSNull class]]){
|
97
|
-
self.type = dictionary[@"type"];
|
98
|
-
}
|
99
|
-
|
100
|
-
|
101
|
-
if(dictionary[@"success"] != nil && ![dictionary[@"success"] isKindOfClass:[NSNull class]]){
|
102
|
-
self.success = [dictionary[@"success"] boolValue];
|
103
|
-
}else{
|
104
|
-
//By default scenario considered as success
|
105
|
-
self.success = YES;
|
106
|
-
}
|
107
|
-
if(dictionary[@"failureReason"] != nil && ![dictionary[@"failureReason"] isKindOfClass:[NSNull class]]){
|
108
|
-
self.failureReason = dictionary[@"failureReason"];
|
109
|
-
}
|
110
|
-
return self;
|
111
|
-
}
|
112
|
-
|
113
|
-
|
114
|
-
/**
|
115
|
-
* Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
|
116
|
-
*/
|
117
|
-
-(NSDictionary *)toDictionary
|
118
|
-
{
|
119
|
-
NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
|
120
|
-
if(self.examples != nil){
|
121
|
-
NSMutableArray * dictionaryElements = [NSMutableArray array];
|
122
|
-
for(CCIExample * examplesElement in self.examples){
|
123
|
-
[dictionaryElements addObject:[examplesElement toDictionary]];
|
124
|
-
}
|
125
|
-
dictionary[@"examples"] = dictionaryElements;
|
126
|
-
}
|
127
|
-
if(self.keyword != nil){
|
128
|
-
dictionary[@"keyword"] = self.keyword;
|
129
|
-
}
|
130
|
-
if(self.location != nil){
|
131
|
-
dictionary[@"location"] = [self.location toDictionary];
|
132
|
-
}
|
133
|
-
if(self.name != nil){
|
134
|
-
dictionary[@"name"] = self.name;
|
135
|
-
}
|
136
|
-
if(self.steps != nil){
|
137
|
-
NSMutableArray * dictionaryElements = [NSMutableArray array];
|
138
|
-
for(CCIStep * stepsElement in self.steps){
|
139
|
-
[dictionaryElements addObject:[stepsElement toDictionary]];
|
140
|
-
}
|
141
|
-
dictionary[@"steps"] = dictionaryElements;
|
142
|
-
}
|
143
|
-
if(self.tags.count > 0 ){
|
144
|
-
|
145
|
-
dictionary[@"parsedTags"] = self.tags;
|
146
|
-
}
|
147
|
-
if(self.type != nil){
|
148
|
-
dictionary[@"type"] = self.type;
|
149
|
-
}
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
dictionary[@"success"] = @(self.success);
|
154
|
-
if(self.failureReason.length > 0){
|
155
|
-
dictionary[@"failureReason"] = self.failureReason;
|
156
|
-
}
|
157
|
-
|
158
|
-
|
159
|
-
return dictionary;
|
160
|
-
|
161
|
-
}
|
162
|
-
|
163
|
-
/**
|
164
|
-
* Implementation of NSCoding encoding method
|
165
|
-
*/
|
166
|
-
/**
|
167
|
-
* Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
|
168
|
-
*/
|
169
|
-
- (void)encodeWithCoder:(NSCoder *)aCoder
|
170
|
-
{
|
171
|
-
if(self.examples != nil){
|
172
|
-
[aCoder encodeObject:self.examples forKey:@"examples"];
|
173
|
-
}
|
174
|
-
if(self.keyword != nil){
|
175
|
-
[aCoder encodeObject:self.keyword forKey:@"keyword"];
|
176
|
-
}
|
177
|
-
if(self.location != nil){
|
178
|
-
[aCoder encodeObject:self.location forKey:@"location"];
|
179
|
-
}
|
180
|
-
if(self.name != nil){
|
181
|
-
[aCoder encodeObject:self.name forKey:@"name"];
|
182
|
-
}
|
183
|
-
if(self.steps != nil){
|
184
|
-
[aCoder encodeObject:self.steps forKey:@"steps"];
|
185
|
-
}
|
186
|
-
if(self.tags != nil){
|
187
|
-
[aCoder encodeObject:self.tags forKey:@"tags"];
|
188
|
-
}
|
189
|
-
if(self.type != nil){
|
190
|
-
[aCoder encodeObject:self.type forKey:@"type"];
|
191
|
-
}
|
192
|
-
[aCoder encodeObject:@(self.success) forKey:@"success"];
|
193
|
-
if(self.failureReason.length > 0){
|
194
|
-
[aCoder encodeObject:self.failureReason forKey:@"failureReason"];
|
195
|
-
}
|
196
|
-
|
197
|
-
}
|
198
|
-
|
199
|
-
/**
|
200
|
-
* Implementation of NSCoding initWithCoder: method
|
201
|
-
*/
|
202
|
-
- (instancetype)initWithCoder:(NSCoder *)aDecoder
|
203
|
-
{
|
204
|
-
self = [super init];
|
205
|
-
self.examples = [aDecoder decodeObjectForKey:@"examples"];
|
206
|
-
self.keyword = [aDecoder decodeObjectForKey:@"keyword"];
|
207
|
-
self.location = [aDecoder decodeObjectForKey:@"location"];
|
208
|
-
self.name = [aDecoder decodeObjectForKey:@"name"];
|
209
|
-
self.steps = [aDecoder decodeObjectForKey:@"steps"];
|
210
|
-
self.tags = [aDecoder decodeObjectForKey:@"tags"];
|
211
|
-
self.type = [aDecoder decodeObjectForKey:@"type"];
|
212
|
-
self.success = [[aDecoder decodeObjectForKey:@"success"] boolValue];
|
213
|
-
self.failureReason = [aDecoder decodeObjectForKey:@"failureReason"];
|
214
|
-
|
215
|
-
return self;
|
216
|
-
}
|
217
|
-
|
218
|
-
#pragma mark - NSCopying
|
219
|
-
- (instancetype)copyWithZone:(NSZone *)zone
|
220
|
-
{
|
221
|
-
CCIScenarioDefinition * copy = [[CCIScenarioDefinition alloc] initWithDictionary:[self toDictionary]];
|
222
|
-
return copy;
|
223
|
-
}
|
224
|
-
@end
|
@@ -1,85 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// CCIStep.h
|
3
|
-
//
|
4
|
-
// Created by Ahmed Ali on 2/1/2016
|
5
|
-
// Copyright © 2016 Ahmed Ali. All rights reserved.
|
6
|
-
//
|
7
|
-
//
|
8
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
// of this software and associated documentation files (the "Software"), to deal
|
10
|
-
// in the Software without restriction, including without limitation the rights
|
11
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
-
// copies of the Software, and to permit persons to whom the Software is
|
13
|
-
// furnished to do so, subject to the following conditions:
|
14
|
-
//
|
15
|
-
// The above copyright notice and this permission notice shall be included in
|
16
|
-
// all copies or substantial portions of the Software.
|
17
|
-
//
|
18
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
// THE SOFTWARE.
|
25
|
-
|
26
|
-
// Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
|
27
|
-
|
28
|
-
#import <Foundation/Foundation.h>
|
29
|
-
#import "CCILocation.h"
|
30
|
-
#import "CCIArgument.h"
|
31
|
-
|
32
|
-
typedef NS_ENUM(NSInteger,CCIStepStatus) {
|
33
|
-
CCIStepStatusNotExecuted = 0,
|
34
|
-
CCIStepStatusPassed,
|
35
|
-
CCIStepStatusFailed
|
36
|
-
};
|
37
|
-
|
38
|
-
/**
|
39
|
-
Represents a step in a scenario
|
40
|
-
Step contains information about its argument, location and keyword (When, Then, Given, etc...)
|
41
|
-
*/
|
42
|
-
@interface CCIStep : NSObject<NSCopying>
|
43
|
-
|
44
|
-
/**
|
45
|
-
Step argument in case it is a DocString or DataTable step
|
46
|
-
*/
|
47
|
-
@property (nonatomic, strong) CCIArgument * argument;
|
48
|
-
|
49
|
-
/**
|
50
|
-
Can be When, Then, Given, etc...
|
51
|
-
*/
|
52
|
-
@property (nonatomic, copy) NSString * keyword;
|
53
|
-
|
54
|
-
/**
|
55
|
-
The location where this step has been written
|
56
|
-
*/
|
57
|
-
@property (nonatomic, strong) CCILocation * location;
|
58
|
-
|
59
|
-
/**
|
60
|
-
The text of the step that comes after the keyword
|
61
|
-
*/
|
62
|
-
@property (nonatomic, copy) NSString * text;
|
63
|
-
|
64
|
-
/**
|
65
|
-
The step status
|
66
|
-
*/
|
67
|
-
@property (nonatomic,assign) CCIStepStatus status;
|
68
|
-
|
69
|
-
|
70
|
-
/**
|
71
|
-
Creates an instance with properties filled from the passed dictionary
|
72
|
-
|
73
|
-
@param dictionary the dictionary that contains all the step data
|
74
|
-
|
75
|
-
@return step instance
|
76
|
-
*/
|
77
|
-
-(instancetype)initWithDictionary:(NSDictionary *)dictionary;
|
78
|
-
|
79
|
-
/**
|
80
|
-
Creates a dictionary from the class properties
|
81
|
-
|
82
|
-
@return the created dictionary
|
83
|
-
*/
|
84
|
-
-(NSDictionary *)toDictionary;
|
85
|
-
@end
|