Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 75cbe0d

Browse files
committed
Split initialization test case into its own file
1 parent 726ec8c commit 75cbe0d

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2019 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter/widgets.dart';
6+
import 'package:flutter_test/flutter_test.dart';
7+
import 'package:video_player/video_player.dart';
8+
9+
import 'video_player_test.dart' show FakeVideoPlayerPlatform;
10+
11+
void main() {
12+
test('plugin initialized', () async {
13+
WidgetsFlutterBinding.ensureInitialized();
14+
FakeVideoPlayerPlatform fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
15+
16+
final VideoPlayerController controller = VideoPlayerController.network(
17+
'https://127.0.0.1',
18+
);
19+
await controller.initialize();
20+
expect(fakeVideoPlayerPlatform.calls.first.method, 'init');
21+
});
22+
}

packages/video_player/video_player/test/video_player_test.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,6 @@ void main() {
9191
fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
9292
});
9393

94-
test('plugin initialized', () async {
95-
final VideoPlayerController controller = VideoPlayerController.network(
96-
'https://127.0.0.1',
97-
);
98-
await controller.initialize();
99-
expect(fakeVideoPlayerPlatform.calls.first.method, 'init');
100-
});
101-
10294
group('initialize', () {
10395
test('asset', () async {
10496
final VideoPlayerController controller = VideoPlayerController.asset(

0 commit comments

Comments
 (0)