Skip to content

Commit

Permalink
Updated Unit-Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenTiigi committed Feb 28, 2018
1 parent 0d4db0d commit fc50d7d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 2 additions & 4 deletions FlyoverKitTests/BaseTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ extension XCTestCase {
/// - flyover1: The first Flyover object
/// - flyover2: The second Flyover object
func XCTAssertFlyover(_ flyover1: Flyover, _ flyover2: Flyover) {
// Assert latitude
XCTAssertEqual(flyover1.coordinate.latitude, flyover2.coordinate.latitude)
// Assert longitude
XCTAssertEqual(flyover1.coordinate.longitude, flyover2.coordinate.longitude)
// Assert Flyover
XCTAssertTrue(flyover1 == flyover2)
}

}
3 changes: 2 additions & 1 deletion FlyoverKitTests/FlyoverCameraTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class FlyoverCameraTests: BaseTests {
.default,
.lowFlying,
.farAway,
.giddy
.giddy,
.astronautView
]
configurationThemes.forEach { (theme) in
let flyoverCamera = FlyoverCamera(mapView: mapView, configurationTheme: theme)
Expand Down
7 changes: 7 additions & 0 deletions FlyoverKitTests/FlyoverProtocolTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ class FlyoverProtocolTests: BaseTests {
XCTAssertFlyover(coordinate, rect)
}

func testFlyoverMKMapCamera() {
let coordinate = self.randomCoordinate
let camera = MKMapCamera()
camera.centerCoordinate = coordinate
XCTAssertFlyover(coordinate, camera)
}

func testFlyoverAwesomePlaceCases() {
for place in FlyoverAwesomePlace.iterate() {
XCTAssertFlyover(place, place.coordinate)
Expand Down

0 comments on commit fc50d7d

Please sign in to comment.