MediaDiscovererTests.cs 600 Bytes
Newer Older
Martin Finkel's avatar
Martin Finkel committed
1
using System.Linq;
Martin Finkel's avatar
Martin Finkel committed
2
using LibVLCSharp.Shared;
Martin Finkel's avatar
Martin Finkel committed
3 4
using NUnit.Framework;

5
namespace LibVLCSharp.Tests
Martin Finkel's avatar
Martin Finkel committed
6 7
{
    [TestFixture]
8
    public class MediaDiscovererTests : BaseSetup
Martin Finkel's avatar
Martin Finkel committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22
    {
        [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);
        }
    }
}