navdata test (requires manual download of data"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user