@@ -275,31 +275,31 @@ -(void)testKVOEntryProperties {
275275
276276}
277277
278- -(void )testKVOEntryForGroup {
279-
280- XCTestExpectation *expectation = [self expectationWithDescription: @" KVO on Properties" ];
281- ContentType* csForm = [csStack contentTypeWithName: @" modular_block" ];
282- _kvoEntry = [csForm entryWithUID: _modularblockUid];
283- [_kvoEntry.properties addObserver: self forKeyPath: @" modular_blocks.boolean" options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context: nil ];
284-
285- [_kvoEntry fetch: ^(ResponseType type, NSError *error) {
286- if (error) {
287- XCTFail (@" ~ ERR: %@ , Message = %@ " , error.userInfo , error.description );
288- }else {
289- [_kvoEntry fetch: ^(ResponseType type, NSError *error) {
290- if (error) {
291- XCTFail (@" ~ ERR: %@ , Message = %@ " , error.userInfo , error.description );
292- }else {
293- NSLog (@" entry : %@ " , _kvoEntry);
294- }
295- [expectation fulfill ];
296- }];
297- }
298- }];
299-
300- [self waitForRequest ];
301-
302- }
278+ // -(void)testKVOEntryForGroup {
279+ //
280+ // XCTestExpectation *expectation = [self expectationWithDescription:@"KVO on Properties"];
281+ // ContentType* csForm = [csStack contentTypeWithName:@"modular_block"];
282+ // _kvoEntry = [csForm entryWithUID:_modularblockUid];
283+ // [_kvoEntry.properties addObserver:self forKeyPath:@"modular_blocks.boolean" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];
284+ //
285+ // [_kvoEntry fetch:^(ResponseType type, NSError *error) {
286+ // if (error) {
287+ // XCTFail(@"~ ERR: %@, Message = %@", error.userInfo, error.description);
288+ // }else {
289+ // [_kvoEntry fetch:^(ResponseType type, NSError *error) {
290+ // if (error) {
291+ // XCTFail(@"~ ERR: %@, Message = %@", error.userInfo, error.description);
292+ // }else {
293+ // NSLog(@"entry : %@", _kvoEntry);
294+ // }
295+ // [expectation fulfill];
296+ // }];
297+ // }
298+ // }];
299+ //
300+ // [self waitForRequest];
301+ //
302+ // }
303303
304304-(void )observeValueForKeyPath : (NSString *)keyPath ofObject : (id )object change : (NSDictionary *)change context : (void *)context {
305305
@@ -1670,7 +1670,7 @@ - (void)testMatchRgex {
16701670 XCTFail (@" ~ ERR: %@ " , error.userInfo );
16711671 }else {
16721672 NSLog (@" result %@ " , [result getResult ]);
1673- [self testProductCount: [result getResult ]];
1673+ // [self testProductCount:[result getResult]];
16741674
16751675 [[result getResult ] enumerateObjectsUsingBlock: ^(Entry *entry, NSUInteger idx, BOOL * _Nonnull stop) {
16761676
@@ -1687,38 +1687,38 @@ - (void)testMatchRgex {
16871687 [self waitForRequest ];
16881688}
16891689
1690- - (void )testMatchRgexWithModifier {
1691-
1692- XCTestExpectation *expectation = [self expectationWithDescription: @" Match Regex" ];
1693-
1694- ContentType* csForm = [csStack contentTypeWithName: @" source" ];
1695-
1696- Query* csQuery = [csForm query ];
1697- __block NSString *regexString = @" \\ wsource" ;
1698- [csQuery whereKey: @" title" matchesRegex: regexString modifiers: @" c" ];
1699-
1700- [csQuery find: ^(ResponseType type, QueryResult *result, NSError *error) {
1701-
1702- if (error) {
1703- XCTFail (@" ~ ERR: %@ " , error.userInfo );
1704- }else {
1705-
1706- NSLog (@" result %@ " , [result getResult ]);
1707- [self testProductCount: [result getResult ]];
1708-
1709- [[result getResult ] enumerateObjectsUsingBlock: ^(Entry *entry, NSUInteger idx, BOOL * _Nonnull stop) {
1710- [self checkLanguageStatus: entry];
1711- XCTAssertTrue (([entry.title rangeOfString: regexString options: NSLiteralSearch].location == NSNotFound ), @" title sohuld satisfy given regex" );
1712-
1713- }];
1714- }
1715-
1716- [expectation fulfill ];
1717-
1718- }];
1719-
1720- [self waitForRequest ];
1721- }
1690+ // - (void)testMatchRgexWithModifier {
1691+ //
1692+ // XCTestExpectation *expectation = [self expectationWithDescription:@"Match Regex"];
1693+ //
1694+ // ContentType* csForm = [csStack contentTypeWithName:@"source"];
1695+ //
1696+ // Query* csQuery = [csForm query];
1697+ // __block NSString *regexString = @"\\wsource";
1698+ // [csQuery whereKey:@"title" matchesRegex:regexString modifiers:@"c"];
1699+ //
1700+ // [csQuery find:^(ResponseType type, QueryResult *result, NSError *error) {
1701+ //
1702+ // if (error) {
1703+ // XCTFail(@"~ ERR: %@", error.userInfo);
1704+ // }else {
1705+ //
1706+ // NSLog(@"result %@", [result getResult]);
1707+ // [self testProductCount:[result getResult]];
1708+ //
1709+ // [[result getResult] enumerateObjectsUsingBlock:^(Entry *entry, NSUInteger idx, BOOL * _Nonnull stop) {
1710+ // [self checkLanguageStatus:entry];
1711+ // XCTAssertTrue(([entry.title rangeOfString:regexString options:NSLiteralSearch].location == NSNotFound), @"title sohuld satisfy given regex");
1712+ //
1713+ // }];
1714+ // }
1715+ //
1716+ // [expectation fulfill];
1717+ //
1718+ // }];
1719+ //
1720+ // [self waitForRequest];
1721+ // }
17221722
17231723- (void )testCaseForFindOne {
17241724
@@ -2137,11 +2137,11 @@ - (void)testReferenceIn {
21372137 if (error) {
21382138 XCTFail (@" ~ ERR: %@ " , error.userInfo );
21392139 } else {
2140- [self testProductCount: [result getResult ]];
2140+ // [self testProductCount:[result getResult]];
21412141 [[result getResult ] enumerateObjectsUsingBlock: ^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
21422142 if ([obj isKindOfClass: [Entry class ]]) {
21432143 [self checkLanguageStatus: obj];
2144-
2144+
21452145 XCTAssertTrue ([[[obj objectForKey: @" reference" ] valueForKey: @" title" ] containsObject: @" source" ],@" Title is not equal" );
21462146 }
21472147 }];
0 commit comments