1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-18 05:27:37 +00:00

Rewrote most of the library

This commit is contained in:
Kim Hugener-Ohlsen
2018-03-02 12:14:26 +01:00
parent a2c012dd7e
commit 245efd6477
181 changed files with 3927 additions and 3020 deletions

View File

@ -0,0 +1,26 @@
using System;
using System.Net;
using System.Threading.Tasks;
namespace MpcNET.Test
{
public class MpcMock : IDisposable
{
public MpcMock()
{
var mpdEndpoint = new IPEndPoint(IPAddress.Loopback, 6600);
Client = new Mpc(mpdEndpoint);
var connected = Task.Run(async () => await Client.ConnectAsync()).Result;
TestOutput.WriteLine($"Connected to MPD : {connected}; Version: {Client.Version}");
}
public Mpc Client { get; }
public void Dispose()
{
Client?.DisconnectAsync().GetAwaiter().GetResult();
TestOutput.WriteLine($"Disconnected from MPD.");
}
}
}