????????????????iOS?????е???????????&?????????н??????????????????±?????е????????????OCUnit??GHUnit????????????????????????????URLManager??
????URLManager?????????UINavigationController??UIViewController????URL Scheme?????????????????????????ViewController????????????????
??????????????????
????????????????????????????????????????????????????????ò???Target?????????????
???????????????????UMTestCase??????1????????????????????UMTestCase??
????#import
????@interface UMTestCase : GHTestCase
????@end
????????1??UMTestCase??????????
????????????
????URLManager??????UMTools????????????UMToolsTestCase????UMTools???????NSURL??NSString??UIView???????漰????URL???QueryString???QueryString?ж?????????????????????ж??????URL???????????UIView??x??y??width??height??????д?????????????ж??????????л??????????????2???? ????setUpClass?г?????????????3????
????????2??????????// ???????????????????????

 

@property   (strong?? nonatomic)     NSString    *string;
// ???????????????????
@property   (strong?? nonatomic)     NSString    *stringWithoutNumber;
// ??????URLEncode?????????????????????????
@property   (strong?? nonatomic)     NSString    *toBeEncode;
// ?? toBeEncode ???????
@property   (strong?? nonatomic)     NSString    *encoded;
// ?????URL??????QueryString
@property   (strong?? nonatomic)     NSURL       *url;
// ?????????URL??QueryString
@property   (strong?? nonatomic)     NSURL       *noQueryUrl;
// ????????UIView
@property   (strong?? nonatomic)     UIView      *view;
(void)setUpClass
{
self.string                 = @"NSString For Test with a number 8848.";
self.stringWithoutNumber    = @"NSString For Test.";
self.toBeEncode             = @"~!@#$%^&*()_+=-[]{}:;"'<>.??/?123qwe????";
self.encoded                = @"%7E%21%40%23%24%25%5E%26%2A%28%29_%2B%3D-%5B%5D%
7B%7D%3A%3B%22%27%3C%3E.%2C%2F%3F123qwe%E6%B1%89%E5%AD%97";
self.url                    = [NSURL URLWithString:@"http://example.com
/patha/pathb/?p2=v2&p1=v1"];
self.noQueryUrl             = [NSURL URLWithString:@"http://example.com
/patha/pathb/"];
self.view                   = [[UIView alloc] initWithFrame:CGRectMake(10.0f??
10.0f?? 100.0f?? 100.f)];
}

 

????????3???????????
????????????????е????????????
??????????????в?????????·???????????4???? ??“ContainsString”???????????????????????????YES??NO?????????????

 

#pragma mark - UMString
- (void)testUMStringContainsString
{
NSString *p = @"For";
NSString *np = @"BAD";
GHAssertTrue([self.string containsString:p]??
@""%@" should contains "%@"."??
self.string?? p);
GHAssertFalse([self.string containsString:np]??
@""%@" should not contain "%@"."??
self.string?? p);

 

????????4???????????????
?????????????????????????????·???????????????????????????????磬??URLEncode??????????5????????????????????????в???????????????????????????????