blob: 4ee36ae7c492506bac1ec2e0e0772ed9ae9fa03c [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 FWFUIDelegateHostApiTests : XCTestCase
@end
@implementation FWFUIDelegateHostApiTests
- (void)testCreateWithIdentifier {
FWFInstanceManager *instanceManager = [[FWFInstanceManager alloc] init];
FWFUIDelegateHostApiImpl *hostAPI =
[[FWFUIDelegateHostApiImpl alloc] initWithInstanceManager:instanceManager];
FlutterError *error;
[hostAPI createWithIdentifier:@0 error:&error];
FWFUIDelegate *delegate = (FWFUIDelegate *)[instanceManager instanceForIdentifier:0];
XCTAssertTrue([delegate conformsToProtocol:@protocol(WKUIDelegate)]);
XCTAssertNil(error);
}
@end