Commit 860f8769 authored by Eyad Hasan's avatar Eyad Hasan
Browse files

* http://x-team.com/2016/08/how-to-get-started-with-ios-unit-tests-in-swift/...

* http://x-team.com/2016/08/how-to-get-started-with-ios-unit-tests-in-swift/ if you want to follow to what I'm doing for the unit test because you don't know what a unit test is.
* This branch will setup unit testing kinda.
parent d31e1058
......@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
62C83AD91AF879227B0E6F76 /* Pods_WhatsOpen.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6465D077C7E63538B5736D27 /* Pods_WhatsOpen.framework */; };
7F47431B1E11C7D100E6E3D1 /* WhatsOpenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F47431A1E11C7D100E6E3D1 /* WhatsOpenTests.swift */; };
CD3C97491DC18AB300A84434 /* SRCTNetworkController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */; };
CD466DD21DC12E1200E44DF5 /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */; };
CD763A7A1DE24EF100ADFD6B /* examplejson.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD763A791DE24EF100ADFD6B /* examplejson.swift */; };
......@@ -19,6 +20,16 @@
CD81F5271DC0334600009FBD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD81F5251DC0334600009FBD /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
7F47431D1E11C7D100E6E3D1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CD81F5111DC0334600009FBD /* Project object */;
proxyType = 1;
remoteGlobalIDString = CD81F5181DC0334600009FBD;
remoteInfo = WhatsOpen;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
CD81F53C1DC118AD00009FBD /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
......@@ -36,6 +47,9 @@
489DBCC0C818AD2377EAAC64 /* Pods-WhatsOpen.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WhatsOpen.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WhatsOpen/Pods-WhatsOpen.debug.xcconfig"; sourceTree = "<group>"; };
58C880B5AD2FFF2665B14E21 /* Pods-WhatsOpen.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WhatsOpen.release.xcconfig"; path = "Pods/Target Support Files/Pods-WhatsOpen/Pods-WhatsOpen.release.xcconfig"; sourceTree = "<group>"; };
6465D077C7E63538B5736D27 /* Pods_WhatsOpen.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WhatsOpen.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7F4743181E11C7D100E6E3D1 /* WhatsOpenTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WhatsOpenTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
7F47431A1E11C7D100E6E3D1 /* WhatsOpenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhatsOpenTests.swift; sourceTree = "<group>"; };
7F47431C1E11C7D100E6E3D1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SRCTNetworkController.swift; sourceTree = "<group>"; };
CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTableViewController.swift; sourceTree = "<group>"; };
CD763A791DE24EF100ADFD6B /* examplejson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = examplejson.swift; path = "Object Model/examplejson.swift"; sourceTree = "<group>"; };
......@@ -50,6 +64,13 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7F4743151E11C7D100E6E3D1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
CD81F5161DC0334600009FBD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
......@@ -61,6 +82,15 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
7F4743191E11C7D100E6E3D1 /* WhatsOpenTests */ = {
isa = PBXGroup;
children = (
7F47431A1E11C7D100E6E3D1 /* WhatsOpenTests.swift */,
7F47431C1E11C7D100E6E3D1 /* Info.plist */,
);
path = WhatsOpenTests;
sourceTree = "<group>";
};
A3AD62AE7C55A9F11823740C /* Pods */ = {
isa = PBXGroup;
children = (
......@@ -74,6 +104,7 @@
isa = PBXGroup;
children = (
CD81F51B1DC0334600009FBD /* WhatsOpen */,
7F4743191E11C7D100E6E3D1 /* WhatsOpenTests */,
CD81F51A1DC0334600009FBD /* Products */,
CD81F5311DC1180C00009FBD /* Frameworks */,
A3AD62AE7C55A9F11823740C /* Pods */,
......@@ -84,6 +115,7 @@
isa = PBXGroup;
children = (
CD81F5191DC0334600009FBD /* WhatsOpen.app */,
7F4743181E11C7D100E6E3D1 /* WhatsOpenTests.xctest */,
);
name = Products;
sourceTree = "<group>";
......@@ -124,6 +156,24 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
7F4743171E11C7D100E6E3D1 /* WhatsOpenTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7F47431F1E11C7D100E6E3D1 /* Build configuration list for PBXNativeTarget "WhatsOpenTests" */;
buildPhases = (
7F4743141E11C7D100E6E3D1 /* Sources */,
7F4743151E11C7D100E6E3D1 /* Frameworks */,
7F4743161E11C7D100E6E3D1 /* Resources */,
);
buildRules = (
);
dependencies = (
7F47431E1E11C7D100E6E3D1 /* PBXTargetDependency */,
);
name = WhatsOpenTests;
productName = WhatsOpenTests;
productReference = 7F4743181E11C7D100E6E3D1 /* WhatsOpenTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
CD81F5181DC0334600009FBD /* WhatsOpen */ = {
isa = PBXNativeTarget;
buildConfigurationList = CD81F52B1DC0334600009FBD /* Build configuration list for PBXNativeTarget "WhatsOpen" */;
......@@ -151,10 +201,16 @@
CD81F5111DC0334600009FBD /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Patrick Murray";
TargetAttributes = {
7F4743171E11C7D100E6E3D1 = {
CreatedOnToolsVersion = 8.2;
DevelopmentTeam = HQSN7HX89U;
ProvisioningStyle = Automatic;
TestTargetID = CD81F5181DC0334600009FBD;
};
CD81F5181DC0334600009FBD = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = HQSN7HX89U;
......@@ -176,11 +232,19 @@
projectRoot = "";
targets = (
CD81F5181DC0334600009FBD /* WhatsOpen */,
7F4743171E11C7D100E6E3D1 /* WhatsOpenTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
7F4743161E11C7D100E6E3D1 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
CD81F5171DC0334600009FBD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
......@@ -242,6 +306,14 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
7F4743141E11C7D100E6E3D1 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7F47431B1E11C7D100E6E3D1 /* WhatsOpenTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
CD81F5151DC0334600009FBD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
......@@ -257,6 +329,14 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
7F47431E1E11C7D100E6E3D1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CD81F5181DC0334600009FBD /* WhatsOpen */;
targetProxy = 7F47431D1E11C7D100E6E3D1 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
CD81F5201DC0334600009FBD /* Main.storyboard */ = {
isa = PBXVariantGroup;
......@@ -277,6 +357,38 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
7F4743201E11C7D100E6E3D1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEVELOPMENT_TEAM = HQSN7HX89U;
INFOPLIST_FILE = WhatsOpenTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen";
};
name = Debug;
};
7F4743211E11C7D100E6E3D1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEVELOPMENT_TEAM = HQSN7HX89U;
INFOPLIST_FILE = WhatsOpenTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen";
};
name = Release;
};
CD81F5291DC0334600009FBD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
......@@ -301,6 +413,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
......@@ -350,6 +463,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
......@@ -374,6 +488,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = HQSN7HX89U;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -393,6 +508,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = HQSN7HX89U;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
......@@ -409,6 +525,14 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
7F47431F1E11C7D100E6E3D1 /* Build configuration list for PBXNativeTarget "WhatsOpenTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7F4743201E11C7D100E6E3D1 /* Debug */,
7F4743211E11C7D100E6E3D1 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
CD81F5141DC0334600009FBD /* Build configuration list for PBXProject "WhatsOpen" */ = {
isa = XCConfigurationList;
buildConfigurations = (
......
<?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>$(PRODUCT_BUNDLE_IDENTIFIER)</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>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
//
// WhatsOpenTests.swift
// WhatsOpenTests
//
// Created by Eyad Hasan on 12/26/16.
// Copyright © 2016 Patrick Murray. All rights reserved.
//
import XCTest
class WhatsOpenTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment