Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #147 from pvzig/tests
Browse files Browse the repository at this point in the history
Add testing
  • Loading branch information
pvzig committed Feb 25, 2019
2 parents 77cc351 + a96c17a commit f94b3b2
Show file tree
Hide file tree
Showing 20 changed files with 1,985 additions and 1 deletion.
8 changes: 8 additions & 0 deletions LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import XCTest

import SlackKitTests

var tests = [XCTestCaseEntry]()
tests += SlackKitTests.__allTests()

XCTMain(tests)
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ let SKWebAPI: Target = .target(name: "SKWebAPI",
dependencies: ["SKCore"],
path: "SKWebAPI/Sources")

let SlackKitTests: Target = .testTarget(name: "SlackKitTests",
dependencies: ["SlackKit", "SKCore", "SKClient", "SKRTMAPI", "SKServer"],
path: "SlackKitTests")
// MARK: Package

let package = Package(
Expand All @@ -60,7 +63,7 @@ let package = Package(
.library(name: "SKWebAPI", targets: ["SKWebAPI"])
],
targets: [
SlackKit, SKClient, SKCore, SKRTMAPI, SKServer, SKWebAPI
SlackKit, SKClient, SKCore, SKRTMAPI, SKServer, SKWebAPI, SlackKitTests
]
)

Expand Down
324 changes: 324 additions & 0 deletions SlackKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions SlackKit.xcodeproj/xcshareddata/xcschemes/SlackKitTests.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2601B6C0222085AB00F197AB"
BuildableName = "SlackKitTests.xctest"
BlueprintName = "SlackKitTests"
ReferencedContainer = "container:SlackKit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<CommandLineArguments>
<CommandLineArgument
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
53 changes: 53 additions & 0 deletions SlackKitTests/Resources/channel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"ok": true,
"channel": {
"id": "C1H9RESGL",
"name": "busting",
"is_channel": true,
"created": 1466025154,
"creator": "U0G9QF9C6",
"is_archived": false,
"is_general": false,
"name_normalized": "busting",
"is_shared": false,
"is_org_shared": false,
"is_member": true,
"is_private": false,
"is_mpim": false,
"last_read": "1503435939.000101",
"latest": {
"text": "Containment unit is 98% full",
"username": "ecto1138",
"bot_id": "B19LU7CSY",
"attachments": [
{
"text": "Don't get too attached",
"id": 1,
"fallback": "This is an attachment fallback"
}
],
"type": "message",
"subtype": "bot_message",
"ts": "1503435956.000247"
},
"unread_count": 1,
"unread_count_display": 1,
"members": [
"U0G9QF9C6",
"U1QNSQB9U"
],
"topic": {
"value": "Spiritual containment strategies",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"purpose": {
"value": "Discuss busting ghosts",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"previous_names": [
"dusting"
]
}
}
39 changes: 39 additions & 0 deletions SlackKitTests/Resources/conversation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"ok": true,
"channel": {
"id": "C012AB3CD",
"name": "general",
"is_channel": true,
"is_group": false,
"is_im": false,
"created": 1449252889,
"creator": "W012A3BCD",
"is_archived": false,
"is_general": true,
"unlinked": 0,
"name_normalized": "general",
"is_read_only": false,
"is_shared": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"is_pending_ext_shared": false,
"is_member": true,
"is_private": false,
"is_mpim": false,
"last_read": "1502126650.228446",
"topic": {
"value": "For public discussion of generalities",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"purpose": {
"value": "This part of the workspace is for fun. Make fun here.",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"previous_names": [ "specifics", "abstractions", "etc" ],
"num_members": 23,
"locale": "en-US"
}
}
Loading

0 comments on commit f94b3b2

Please sign in to comment.