(void)testUrlencode
{
GHAssertEqualStrings([self.toBeEncode urlencode]?? self.encoded??
@"URLEncode Error."??
self.toBeEncode?? self.encoded);
GHAssertEqualStrings([self.encoded urldecode]?? self.toBeEncode??
@"URLDecode Error."??
self.encoded?? self.toBeEncode);
}

 

????????5??URLEncode????????
????????????????????urlencode???????????“~”?????????????????????????????????????????о??????????????л?????????????????
??????????????棬????????????????
???????????????????????????????е??????????URLManager????????????????????棺OCHamcrest??
???????????????????????OCHamcrest???????????“HC_SHORTHAND”???????????????д????????????д???????????е?“containsString”??????????????????5???е?“containsString:”????????????????2????????????????У????????????????????????“HC_asserTaht”????????HC??????????????
?????????????????????????????????д?????OCHamcrest?????????д???????????????????????????е???????????????????????????й?????????????????????????????????????????????????????????????????????????
?????????????????????????????????磬URLManager??UMURL???????????URL?????????????????????????????????????????????????????????????6????
????#pragma mark - UMURL
????- (void)testAddParams
????{
????NSURL *queryUrl = [self.noQueryUrl addParams:@{@"p1":@"v1"??@"p2":@"v2"}];
????HC_assertThat(queryUrl.absoluteString?? HC_containsString(@"p1=v1"));
????HC_assertThat(queryUrl.absoluteString?? HC_containsString(@"p2=v2"));
????}
????????6??URL????????????
???????????е?????
???????????????????????????????Щ???н????????????????????????????????????????????
????????????????????????????????????磺NSArray??????SDK?????????????????д???????????????????????????nil????removeAllSubviews??????У??????view????removeAllSubviews??????????view.subviews??????SDK 6.x????SDK 7 DP1???????????????????SDK 7 DP3?У?SDK????????????????????????????????????????????????view.subviews???????nil??????????????HC_empty()??????????????????????????????????subviews???????ж??????7????

 

(void)testRemoveAllSubviews
{
UIView *subViewA = [[UIView alloc] init];
UIView *subViewB = [[UIView alloc] init];
[self.view addSubview:subViewA];
[self.view addSubview:subViewB];
HC_assertThat(self.view.subviews?? HC_containsInAnyOrder(subViewA?? subViewB?? nil));
[self.view removeAllSubviews];
if (nil != self.view.subviews) {
HC_assertThat(self.view.subviews?? HC_empty());
}
}

????????7??removeAllSubviews????
????????????????????л????Щ????????????????????collection??containsInAnyOrder????????????????collection??????????NSFastEnumerationЭ??????NSArray????????????????????????????????????????????????????????????????????????????????????л????????????????????????????collection???????????????????????????б????????????????е?????????????????????????????
??????UMNavigationController??????У?????ж????????URL Mapping?????Ч???????????????????????ж?config????????????URL???????????????????config????????д??????????????????????????????????????8????