This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-8
lines changed
packages/video_player/video_player/test Expand file tree Collapse file tree 2 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments