Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enzevalos_iphone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enzevalos
enzevalos_iphone
Commits
d35cbc70
Commit
d35cbc70
authored
7 years ago
by
kondeichmann
Browse files
Options
Downloads
Patches
Plain Diff
add Tests for Invitation
parent
3045f970
No related branches found
No related tags found
1 merge request
!11
Feature/invitation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enzevalos_iphoneTests/InvitationTests.swift
+38
-0
38 additions, 0 deletions
enzevalos_iphoneTests/InvitationTests.swift
with
38 additions
and
0 deletions
enzevalos_iphoneTests/InvitationTests.swift
0 → 100644
+
38
−
0
View file @
d35cbc70
//
// InvitationTests.swift
// enzevalos_iphoneTests
//
// Created by Konstantin Deichmann on 08.01.18.
// Copyright © 2018 fu-berlin. All rights reserved.
//
import
XCTest
@testable
import
enzevalos_iphone
class
InvitationTests
:
XCTestCase
{
func
testWordsInString
()
{
let
string
=
"Diese App hat viele Vorteile"
let
firstStringRange
=
NSRange
(
location
:
0
,
length
:
5
)
let
secondStringRange
=
NSRange
(
location
:
7
,
length
:
9
)
let
firstResult
=
string
.
words
(
inRange
:
firstStringRange
)
let
secondResult
=
string
.
words
(
inRange
:
secondStringRange
)
print
(
firstResult
)
XCTAssertEqual
(
firstResult
.
count
,
1
)
XCTAssertEqual
(
firstResult
.
first
?
.
word
,
"Diese"
)
XCTAssertEqual
(
firstResult
.
first
?
.
index
,
0
)
print
(
secondResult
)
XCTAssertEqual
(
secondResult
.
count
,
3
)
XCTAssertEqual
(
secondResult
[
0
]
.
word
,
"App"
)
XCTAssertEqual
(
secondResult
[
1
]
.
word
,
"hat"
)
XCTAssertEqual
(
secondResult
[
2
]
.
word
,
"viele"
)
XCTAssertEqual
(
secondResult
[
0
]
.
index
,
6
)
XCTAssertEqual
(
secondResult
[
1
]
.
index
,
10
)
XCTAssertEqual
(
secondResult
[
2
]
.
index
,
14
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment