GitHub PullRequestReviewCommentEvent at 2014-05-22 17:22:41
Repository: terraformer-objc
Actor: aranasaurus
Payload: {"comment":{"url":"https://api.github.com/repos/esripdx/terraformer-objc/pulls/comments/12962088","id":12962088,"diff_hunk":"@@ -0,0 +1,106 @@\n+//\n+//  TFGeometryCollectionTests.m\n+//  Terraformer\n+//\n+//  Created by Ryan Arana on 5/21/14.\n+//  Copyright (c) 2014 pdx.esri.com. All rights reserved.\n+//\n+\n+#import <XCTest/XCTest.h>\n+#import \"TFGeometryCollection.h\"\n+#import \"TFGeometry.h\"\n+#import \"TFCoordinate.h\"\n+#import \"TFPoint.h\"\n+#import \"TFPolygon.h\"\n+#import \"TFLineString.h\"\n+\n+@interface TFGeometryCollectionTests : XCTestCase\n+\n+@end\n+\n+@implementation TFGeometryCollectionTests\n+\n+- (void)setUp\n+{\n+    [super setUp];\n+    // Put setup code here. This method is called before the invocation of each test method in the class.\n+}\n+\n+- (void)tearDown\n+{\n+    // Put teardown code here. This method is called after the invocation of each test method in the class.\n+    [super tearDown];\n+}\n+\n+- (void)testBBox {\n+    TFGeometryCollection *gc = [[TFGeometryCollection alloc] initWithGeometries:@[\n+            [[TFGeometry alloc] initWithType:@\"Polygon\" coordinates:@[\n+                    [TFCoordinate coordinateWithX:-5 y:-10],\n+                    [TFCoordinate coordinateWithX:-2 y:-40],\n+                    [TFCoordinate coordinateWithX:0 y:35],\n+                    [TFCoordinate coordinateWithX:5 y:10],\n+                    [TFCoordinate coordinateWithX:25 y:5]\n+            ]],\n+            [[TFGeometry alloc] initWithType:@\"Point\" coordinates:@[\n+                    [TFCoordinate coordinateWithX:34 y:0]\n+            ]]\n+    ]];\n+    NSArray *expected = @[@(-5), @(-40), @(34), @(35)];\n+    XCTAssertEqualObjects(expected, [gc bbox]);\n+}\n+\n+- (void)testEnvelope {\n+    TFGeometryCollection *gc = [[TFGeometryCollection alloc] initWithGeometries:@[\n+            [[TFGeometry alloc] initWithType:@\"Polygon\" coordinates:@[\n+                    [TFCoordinate coordinateWithX:-5 y:-10],\n+                    [TFCoordinate coordinateWithX:-2 y:-40],\n+                    [TFCoordinate coordinateWithX:0 y:35],\n+                    [TFCoordinate coordinateWithX:5 y:10],\n+                    [TFCoordinate coordinateWithX:25 y:5]\n+            ]],\n+            [[TFGeometry alloc] initWithType:@\"Point\" coordinates:@[\n+                    [TFCoordinate coordinateWithX:34 y:0]\n+            ]]\n+    ]];\n+    NSArray *expected = @[@(-5), @(-40), @(39), @(75)];\n+    XCTAssertEqualObjects(expected, [gc envelope]);\n+}\n+\n+- (void)testAddGeometry {\n+    TFGeometryCollection *gc = [[TFGeometryCollection alloc] initWithGeometries:@[\n+            [TFPoint pointWithX:5 y:10]\n+    ]];\n+    TFPoint *p2 = [TFPoint pointWithX:-1 y:0];\n+    [gc addGeometry:p2];\n+    XCTAssertTrue([gc.geometries count] == 2);\n+    XCTAssertTrue([gc.geometries containsObject:p2]);\n+}\n+\n+- (void)testGeometriesWhichContainGeometry {\n+    /* TODO: Make this test pass\n+    TFPoint *p = [TFPoint pointWithX:0 y:0];\n+    TFLineString *ls = [TFLineString lineStringWithXYs:@[@(10), @(10), @(0), @(0)]];","path":"TerraformerTests/TFGeometryCollectionTests.m","position":82,"original_position":82,"commit_id":"fa8d4af7db02c17c0ecfb5bee26db1ad2e649914","original_commit_id":"4bc904220e18aa7db46f02c4a8a877849f626162","user":{"login":"aranasaurus","id":260004,"avatar_url":"https://avatars.githubusercontent.com/u/260004?","gravatar_id":"512e3b7edca3b269412fcae6371ec014","url":"https://api.github.com/users/aranasaurus","html_url":"https://github.com/aranasaurus","followers_url":"https://api.github.com/users/aranasaurus/followers","following_url":"https://api.github.com/users/aranasaurus/following{/other_user}","gists_url":"https://api.github.com/users/aranasaurus/gists{/gist_id}","starred_url":"https://api.github.com/users/aranasaurus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aranasaurus/subscriptions","organizations_url":"https://api.github.com/users/aranasaurus/orgs","repos_url":"https://api.github.com/users/aranasaurus/repos","events_url":"https://api.github.com/users/aranasaurus/events{/privacy}","received_events_url":"https://api.github.com/users/aranasaurus/received_events","type":"User","site_admin":false},"body":"should be two... [10, 10] and [0, 0], no?","created_at":"2014-05-22T17:22:41Z","updated_at":"2014-05-22T17:22:41Z","html_url":"https://github.com/esripdx/terraformer-objc/pull/8#discussion_r12962088","pull_request_url":"https://api.github.com/repos/esripdx/terraformer-objc/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/esripdx/terraformer-objc/pulls/comments/12962088"},"html":{"href":"https://github.com/esripdx/terraformer-objc/pull/8#discussion_r12962088"},"pull_request":{"href":"https://api.github.com/repos/esripdx/terraformer-objc/pulls/8"}}}}