Commit dc1cfc49 authored by Martin Finkel's avatar Martin Finkel

Fix tests build

(cherry picked from commit ad6b75e86b2ad7f83b19cb473d840efd4f1008cf)
parent 87b0e5fa
......@@ -13,10 +13,9 @@ namespace LibVLCSharp.Tests
public void MetaChangedEventSubscribe()
{
var media = new Media(new LibVLC(), Path.GetTempFileName());
var eventManager = media.EventManager;
var eventHandlerCalled = false;
const Media.MetadataType description = Media.MetadataType.Description;
eventManager.MetaChanged += (sender, args) =>
media.MetaChanged += (sender, args) =>
{
Assert.AreEqual(description, args.MetadataType);
eventHandlerCalled = true;
......@@ -31,7 +30,7 @@ namespace LibVLCSharp.Tests
var called = false;
long duration = 0;
media.EventManager.DurationChanged += (sender, args) =>
media.DurationChanged += (sender, args) =>
{
called = true;
duration = args.Duration;
......@@ -48,7 +47,7 @@ namespace LibVLCSharp.Tests
{
var media = new Media(new LibVLC(), RealMp3Path);
var eventCalled = false;
media.EventManager.MediaFreed += (sender, args) =>
media.MediaFreed += (sender, args) =>
{
eventCalled = true;
};
......@@ -64,7 +63,7 @@ namespace LibVLCSharp.Tests
var media = new Media(new LibVLC(), RealMp3Path);
var tcs = new TaskCompletionSource<bool>();
var openingCalled = false;
media.EventManager.StateChanged += (sender, args) =>
media.StateChanged += (sender, args) =>
{
if (media.State == VLCState.Opening)
{
......
......@@ -16,8 +16,8 @@ namespace LibVLCSharp.Tests
var media = new Media(libVLC, Path.GetTempFileName());
var itemAdded = false;
var itemDeleted = false;
mediaList.EventManager.ItemAdded += (sender, args) => itemAdded = true;
mediaList.EventManager.ItemDeleted += (sender, args) => itemDeleted = true;
mediaList.ItemAdded += (sender, args) => itemAdded = true;
mediaList.ItemDeleted += (sender, args) => itemDeleted = true;
mediaList.Lock();
mediaList.AddMedia(media);
Assert.AreEqual(media, mediaList[0]);
......
......@@ -48,7 +48,7 @@ namespace LibVLCSharp.Tests
mp.Media = media;
mp.Play();
mp.EventManager.Playing += (sender, args) =>
mp.Playing += (sender, args) =>
{
Assert.Zero(mp.AudioTrack);
var description = mp.AudioTrackDescription;
......@@ -67,7 +67,7 @@ namespace LibVLCSharp.Tests
var media = new Media(libVLC, "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4", Media.FromType.FromLocation);
var mp = new MediaPlayer(media);
var called = false;
mp.EventManager.Playing += (sender, args) =>
mp.Playing += (sender, args) =>
{
called = true;
};
......
......@@ -36,7 +36,7 @@ namespace LibVLCSharp.Tests
var rendererItems = new List<RendererItem>();
var tcs = new TaskCompletionSource<bool>();
rendererDiscoverer.EventManager.ItemAdded += (sender, args) =>
rendererDiscoverer.ItemAdded += (sender, args) =>
{
WriteLine($"New item discovered: {args.RendererItem.Name} of type {args.RendererItem.Type}");
if (args.RendererItem.CanRenderVideo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment