Esempio n. 1
0
 public void setVideoTest1()
 {
     Player_Accessor target = new Player_Accessor();
     string vidPath = sampleVideos[2];
     IVideo video = new Video(false, vidPath, new YuvVideoInfo(vidPath), null);
     int position = 0;
     target.setVideo(video, position);
     Assert.AreEqual(video, target.video);
 }
Esempio n. 2
0
 public void setVideoTest()
 {
     Player_Accessor target = new Player_Accessor();
     string vidPath = sampleVideos[2];
     object video = new Video(false, vidPath, new YuvVideoInfo(vidPath), null);
     target.setVideo(video);
     Assert.AreEqual(video, target.video);
 }
Esempio n. 3
0
 public void OnPropertyChangedTest_randomJumpPositionUpdate()
 {
     Thread.Sleep(5000);
     Player_Accessor target = new Player_Accessor();
     string expected = "rjpu";
     string vidPath = sampleVideos[2];
     object video = new Video(false, vidPath, new YuvVideoInfo(vidPath), null);
     target.setVideo(video);
     PropertyChangedEventArgs e = new PropertyChangedEventArgs(target.randomJumpPositionUpdate);
     target.OnPropertyChanged(this, e);
     int jumpTo;
     Int32.TryParse(target.jumpToFrameTextBox.Text, out jumpTo);
     Assert.AreEqual(expected, e.PropertyName, "Property name is wrong. ");
     Assert.AreEqual(jumpTo, target.video.handler.positionReader);
 }
Esempio n. 4
0
 public void OnPropertyChangedTest_posReadProName()
 {
     string vidPath = sampleVideos[2];
     object video = new Video(false, vidPath, new YuvVideoInfo(vidPath), null);
     Player_Accessor target = new Player_Accessor();
     target.setVideo(video);
     string expected = "positionReader";
     PropertyChangedEventArgs e = new PropertyChangedEventArgs(target.posReadProName);
     target.OnPropertyChanged(this, e);
     Assert.AreEqual(expected, e.PropertyName, "Property name is wrong. ");
     Assert.AreEqual(target._positionReader, target.video.handler.positionReader);
 }
Esempio n. 5
0
 public void jumpToFrame_ClickTest()
 {
     Player_Accessor target = new Player_Accessor();
     object sender = null;
     RoutedEventArgs e = null;
     string vidPath = sampleVideos[2];
     IVideo video = new Video(false, vidPath, new YuvVideoInfo(vidPath), null);
     int position = 0;
     target.setVideo(video, position);
     target.jumpToFrame_Click(sender, e);
     OnPropertyChangedTest_randomJumpPositionUpdate();
 }
Esempio n. 6
0
 public void getFrameTest()
 {
     Player_Accessor target = new Player_Accessor();
     string vidPath = sampleVideos[2];
     IVideo video = new Video(false, vidPath, new YuvVideoInfo(vidPath), null);
     int position = 0;
     target.setVideo(video, position);
     target.getFrame(position);
 }