MediaDiscovererTests.cs 585 Bytes
Newer Older
Martin Finkel's avatar
Martin Finkel committed
1 2
using System.Linq;
using NUnit.Framework;
3
using VideoLAN.LibVLC;
Martin Finkel's avatar
Martin Finkel committed
4

5
namespace LibVLCSharp.Tests
Martin Finkel's avatar
Martin Finkel committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
{
    [TestFixture]
    public class MediaDiscovererTests
    {
        [Test]
        public void CreateStartAndStopDiscoverer()
        {
            var instance = new Instance();
            var mds = instance.MediaDiscoverers(MediaDiscoverer.Category.Lan);
            var md = new MediaDiscoverer(instance, mds.First().Name);
            Assert.True(md.Start());
            Assert.True(md.IsRunning);
            md.Stop();
            Assert.False(md.IsRunning);
        }
    }
}