navdata test (requires manual download of data"

This commit is contained in:
2016-04-17 15:08:25 +02:00
parent 7320e8db77
commit fff1088e78
4 changed files with 101 additions and 2 deletions
+31 -1
View File
@@ -6,9 +6,12 @@
// Copyright © 2016 Kilian Hofmann. All rights reserved.
//
#import "NavDataParser.h"
#import <XCTest/XCTest.h>
@interface FMC_Planner_2Tests : XCTestCase
@interface FMC_Planner_2Tests : XCTestCase {
NavDataParser *parser;
}
@end
@@ -19,6 +22,9 @@
[super setUp];
// Put setup code here. This method is called before the invocation of each
// test method in the class.
if (parser == nil) {
parser = [[NavDataParser alloc] init];
}
}
- (void)tearDown
@@ -28,4 +34,28 @@
[super tearDown];
}
#pragma mark - NavData
- (void)testWaypoint
{
XCTAssertTrue([parser findWaypoint:@"DKB"].count > 0);
}
- (void)testAirway
{
XCTAssertTrue([parser findAirway:@"T104"].count > 0);
}
- (void)testWaypointOnAirway
{
XCTAssertTrue([parser findWaypoint:@"DKB" onAirway:@"T702"].count == 0);
}
- (void)testCrosspoint
{
XCTAssertTrue(
[[parser findCrosspointBetween:@"T104" and:@"T702" withStart:@"DKB"]
.firstObject isEqualToString:@"WLD"]);
}
@end