blob: 02e473f8b795fdab525bdfe40d9430398e2a379e [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@import Flutter;
@import XCTest;
@import webview_flutter_wkwebview;
#import <OCMock/OCMock.h>
@interface FWFNavigationDelegateHostApiTests : XCTestCase
@end
@implementation FWFNavigationDelegateHostApiTests
- (void)testCreateWithIdentifier {
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
FWFNavigationDelegateHostApiImpl *hostApi =
[[FWFNavigationDelegateHostApiImpl alloc] initWithInstanceManager:instanceManager];
FlutterError *error;
[hostApi createWithIdentifier:@0 error:&error];
FWFNavigationDelegate *navigationDelegate =
(FWFNavigationDelegate *)[instanceManager instanceForIdentifier:0];
XCTAssertTrue([navigationDelegate conformsToProtocol:@protocol(WKNavigationDelegate)]);
XCTAssertNil(error);
}
@end