Skip to content

Commit

Permalink
created the unit test with test wrapper for encodeString
Browse files Browse the repository at this point in the history
  • Loading branch information
mRs- committed Nov 19, 2015
1 parent 8c2e3f3 commit 3391c57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/PINCacheTests/PINCacheTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
NSString * const PINCacheTestName = @"PINCacheTest";
NSTimeInterval PINCacheTestBlockTimeout = 5.0;

@interface PINDiskCache()

- (NSString *)encodedString:(NSString *)string;

@end

@interface PINCacheTests ()
@property (strong, nonatomic) PINCache *cache;
@end
Expand Down Expand Up @@ -64,7 +70,7 @@ - (dispatch_time_t)timeout

- (void)testDiskCacheStringEncoding
{
NSString *string = [@"http://www.test.de-<CoolStuff>" stringByAddingPercentEncodingWithAllowedCharacters:[[NSCharacterSet characterSetWithCharactersInString:@".:/"] invertedSet]];
NSString *string = [self.cache.diskCache encodedString:@"http://www.test.de-<CoolStuff>"];
XCTAssertTrue([string isEqualToString:@"http%3A%2F%2Fwww%2Etest%2Ede-<CoolStuff>"]);
}

Expand Down

0 comments on commit 3391c57

Please sign in to comment.