Skip to content

Added Unit tests for Some Extension methods #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ target 'iOSBaseProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

pod 'Alamofire', '~> 4.5'
pod 'Alamofire', '~> 4.7.2'
pod 'MBProgressHUD', '~> 1.1.0'
pod 'EVReflection/Alamofire'
pod 'IQKeyboardManagerSwift'
Expand Down
12 changes: 6 additions & 6 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Alamofire (4.7.1)
- Alamofire (4.7.2)
- EVReflection/Alamofire (5.6.0):
- Alamofire
- EVReflection/Core
Expand All @@ -9,27 +9,27 @@ PODS:
- Toast-Swift (3.0.1)

DEPENDENCIES:
- Alamofire (~> 4.5)
- Alamofire (~> 4.7.2)
- EVReflection/Alamofire
- IQKeyboardManagerSwift
- MBProgressHUD (~> 1.1.0)
- Toast-Swift (~> 3.0.1)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
https://github.com/cocoapods/specs.git:
- Alamofire
- EVReflection
- IQKeyboardManagerSwift
- MBProgressHUD
- Toast-Swift

SPEC CHECKSUMS:
Alamofire: 68d7d521118d49c615a8d2214d87cdf525599d30
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
EVReflection: 5c9443fd3d9b71eaab8c2321e3a2aca155ac352e
IQKeyboardManagerSwift: 624f128983eec795deacd50c1cd2f72664d13f08
MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9
Toast-Swift: ba0b01b095aada709d915f9beb1d38184a2721c3

PODFILE CHECKSUM: 9c5678be6821ed4683423a2062cf41be1ee458eb
PODFILE CHECKSUM: aa397becf82a8878769e5e41d98e6967228fc3d2

COCOAPODS: 1.5.0
COCOAPODS: 1.5.2
150 changes: 133 additions & 17 deletions iOSBaseProject.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 48;
objects = {

/* Begin PBXBuildFile section */
621DCA89DAB6FBEE1EB1894F /* Pods_iOSBaseProject.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F749E4A9A58FEF4728587C /* Pods_iOSBaseProject.framework */; };
91FEBC5420BDAF090069B3F3 /* StringPrimitiveTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91FEBC5320BDAF090069B3F3 /* StringPrimitiveTests.swift */; };
C89F1C04208389F50089E306 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89F1C03208389F50089E306 /* AppDelegate.swift */; };
C89F1C06208389F50089E306 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89F1C05208389F50089E306 /* ViewController.swift */; };
C89F1C09208389F50089E306 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C89F1C07208389F50089E306 /* Main.storyboard */; };
Expand All @@ -28,9 +29,22 @@
C89F1C8B208392230089E306 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89F1C88208392230089E306 /* BaseViewController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
91FEBC5620BDAF090069B3F3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C89F1BF8208389F50089E306 /* Project object */;
proxyType = 1;
remoteGlobalIDString = C89F1BFF208389F50089E306;
remoteInfo = iOSBaseProject;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
0053CF8518D9F46A01537914 /* Pods-iOSBaseProject.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iOSBaseProject.debug.xcconfig"; path = "Pods/Target Support Files/Pods-iOSBaseProject/Pods-iOSBaseProject.debug.xcconfig"; sourceTree = "<group>"; };
50F749E4A9A58FEF4728587C /* Pods_iOSBaseProject.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_iOSBaseProject.framework; sourceTree = BUILT_PRODUCTS_DIR; };
91FEBC5120BDAF090069B3F3 /* iOSBaseProjectTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSBaseProjectTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
91FEBC5320BDAF090069B3F3 /* StringPrimitiveTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringPrimitiveTests.swift; sourceTree = "<group>"; };
91FEBC5520BDAF090069B3F3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C89F1C00208389F50089E306 /* iOSBaseProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSBaseProject.app; sourceTree = BUILT_PRODUCTS_DIR; };
C89F1C03208389F50089E306 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
C89F1C05208389F50089E306 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
Expand All @@ -55,6 +69,13 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
91FEBC4E20BDAF090069B3F3 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C89F1BFD208389F50089E306 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -83,10 +104,20 @@
name = Frameworks;
sourceTree = "<group>";
};
91FEBC5220BDAF090069B3F3 /* iOSBaseProjectTests */ = {
isa = PBXGroup;
children = (
91FEBC5320BDAF090069B3F3 /* StringPrimitiveTests.swift */,
91FEBC5520BDAF090069B3F3 /* Info.plist */,
);
path = iOSBaseProjectTests;
sourceTree = "<group>";
};
C89F1BF7208389F50089E306 = {
isa = PBXGroup;
children = (
C89F1C02208389F50089E306 /* iOSBaseProject */,
91FEBC5220BDAF090069B3F3 /* iOSBaseProjectTests */,
C89F1C01208389F50089E306 /* Products */,
0F0899E790D10003085E92B8 /* Pods */,
79E06ECEE5665E70C0EDA902 /* Frameworks */,
Expand All @@ -97,6 +128,7 @@
isa = PBXGroup;
children = (
C89F1C00208389F50089E306 /* iOSBaseProject.app */,
91FEBC5120BDAF090069B3F3 /* iOSBaseProjectTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -145,8 +177,8 @@
C89F1C2120838E9E0089E306 /* Extensions */ = {
isa = PBXGroup;
children = (
C89F1C74208390AA0089E306 /* Date.swift */,
C89F1C78208390AB0089E306 /* PrimitiveTypes.swift */,
C89F1C74208390AA0089E306 /* Date.swift */,
C89F1C71208390AA0089E306 /* UIImage.swift */,
C89F1C77208390AB0089E306 /* UILabel.swift */,
C89F1C7A208390AB0089E306 /* UITextView.swift */,
Expand Down Expand Up @@ -242,6 +274,24 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
91FEBC5020BDAF090069B3F3 /* iOSBaseProjectTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 91FEBC5A20BDAF090069B3F3 /* Build configuration list for PBXNativeTarget "iOSBaseProjectTests" */;
buildPhases = (
91FEBC4D20BDAF090069B3F3 /* Sources */,
91FEBC4E20BDAF090069B3F3 /* Frameworks */,
91FEBC4F20BDAF090069B3F3 /* Resources */,
);
buildRules = (
);
dependencies = (
91FEBC5720BDAF090069B3F3 /* PBXTargetDependency */,
);
name = iOSBaseProjectTests;
productName = iOSBaseProjectTests;
productReference = 91FEBC5120BDAF090069B3F3 /* iOSBaseProjectTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
C89F1BFF208389F50089E306 /* iOSBaseProject */ = {
isa = PBXNativeTarget;
buildConfigurationList = C89F1C12208389FF0089E306 /* Build configuration list for PBXNativeTarget "iOSBaseProject" */;
Expand Down Expand Up @@ -271,13 +321,19 @@
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Cotta & Cush";
TargetAttributes = {
91FEBC5020BDAF090069B3F3 = {
CreatedOnToolsVersion = 9.3.1;
ProvisioningStyle = Automatic;
TestTargetID = C89F1BFF208389F50089E306;
};
C89F1BFF208389F50089E306 = {
CreatedOnToolsVersion = 9.3;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = C89F1BFB208389F50089E306 /* Build configuration list for PBXProject "iOSBaseProject" */;
compatibilityVersion = "Xcode 9.3";
compatibilityVersion = "Xcode 8.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Expand All @@ -290,11 +346,19 @@
projectRoot = "";
targets = (
C89F1BFF208389F50089E306 /* iOSBaseProject */,
91FEBC5020BDAF090069B3F3 /* iOSBaseProjectTests */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
91FEBC4F20BDAF090069B3F3 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C89F1BFE208389F50089E306 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -355,6 +419,14 @@
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
91FEBC4D20BDAF090069B3F3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
91FEBC5420BDAF090069B3F3 /* StringPrimitiveTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C89F1BFC208389F50089E306 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -379,6 +451,14 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
91FEBC5720BDAF090069B3F3 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C89F1BFF208389F50089E306 /* iOSBaseProject */;
targetProxy = 91FEBC5620BDAF090069B3F3 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
C89F1C07208389F50089E306 /* Main.storyboard */ = {
isa = PBXVariantGroup;
Expand All @@ -399,6 +479,38 @@
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
91FEBC5820BDAF090069B3F3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = VNTMDT5LW2;
INFOPLIST_FILE = iOSBaseProjectTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.cottacush.sample.iOSBaseProjectTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSBaseProject.app/iOSBaseProject";
};
name = Debug;
};
91FEBC5920BDAF090069B3F3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = VNTMDT5LW2;
INFOPLIST_FILE = iOSBaseProjectTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.cottacush.sample.iOSBaseProjectTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSBaseProject.app/iOSBaseProject";
};
name = Release;
};
C89F1C10208389FF0089E306 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -450,10 +562,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SDKROOT = iphoneos11.2;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
Expand Down Expand Up @@ -504,9 +616,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SDKROOT = iphoneos11.2;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
Expand All @@ -519,14 +631,12 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 44WM7BTB59;
DEVELOPMENT_TEAM = VNTMDT5LW2;
INFOPLIST_FILE = iOSBaseProject/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.cottacush.iOSBaseProject;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos11.2;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -538,12 +648,9 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 44WM7BTB59;
DEVELOPMENT_TEAM = VNTMDT5LW2;
INFOPLIST_FILE = iOSBaseProject/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.cottacush.iOSBaseProject;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
Expand All @@ -554,6 +661,15 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
91FEBC5A20BDAF090069B3F3 /* Build configuration list for PBXNativeTarget "iOSBaseProjectTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
91FEBC5820BDAF090069B3F3 /* Debug */,
91FEBC5920BDAF090069B3F3 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C89F1BFB208389F50089E306 /* Build configuration list for PBXProject "iOSBaseProject" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
7 changes: 0 additions & 7 deletions iOSBaseProject/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// AppDelegate.swift
// iOSBaseProject
//
// Created by codedentwickler on 4/15/18.
// Copyright © 2018 Cotta & Cush. All rights reserved.
//

import UIKit

Expand Down
1 change: 0 additions & 1 deletion iOSBaseProject/Extensions/PrimitiveTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ extension String {
}

var intValue : Int? {

return Int(self)
}

Expand Down
9 changes: 2 additions & 7 deletions iOSBaseProject/Utils/Identifiers.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
//
// Identifiers.swift
// iOSBaseProject
//
// Created by codedentwickler on 4/15/18.
// Copyright © 2018 Cotta & Cush. All rights reserved.
//

import Foundation

struct StringIDs {

struct SegueIdentfiers {}



struct StoryBoardIdentifiers {
static let MAIN = "Main"
Expand Down
7 changes: 0 additions & 7 deletions iOSBaseProject/ViewController.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//
// ViewController.swift
// iOSBaseProject
//
// Created by codedentwickler on 4/15/18.
// Copyright © 2018 Cotta & Cush. All rights reserved.
//

import UIKit

Expand Down
Loading