Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Commit

Permalink
Add one test with handle preceded by dot
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Thiebaud committed May 28, 2014
1 parent 672c339 commit 13345b7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion STTweetLabelExample/STTweetLabel Tests/STTweetLabel_Tests.m
Expand Up @@ -45,7 +45,7 @@ - (void)initiateTestFromSample:(NSString *)text results:(NSArray *)results
[_tweetLabel setText:text];
NSArray *hotWords = [self hotWordsListForSampleText:text];

XCTAssertEqual(results.count, hotWords.count, @"Number of hot words should be %d but %d was returned instead.", results.count, hotWords.count);
XCTAssertEqual(results.count, hotWords.count, @"Number of hot words should be %ld but %ld was returned instead.", results.count, hotWords.count);

if (results.count == hotWords.count)
{
Expand Down Expand Up @@ -230,6 +230,16 @@ - (void)test_setTextAndGetHotWords_setTextWithOneInvalidHandle_hotWords
[self initiateTestFromSample:string results:results];
}

- (void)test_setTextAndGetHotWords_setTextWithOneDotAndHandle_hotWords
{
NSString *string = @"This is a sample test. .@Ok";
NSArray *results = @[
@{@"hotWord": @(STTweetHandle), @"range": [NSValue valueWithRange:NSMakeRange(24, 3)]}
];

[self initiateTestFromSample:string results:results];
}

- (void)test_setTextAndGetHotWords_setTextWithOneLink_hotWords
{
NSString *string = @"This is a sample test with http://www.link.com/";
Expand Down

0 comments on commit 13345b7

Please sign in to comment.