public void TestConnectionPass()
 {
     ConnectionInformations.initConnection(Constants.Login, Constants.Password, Constants.Server, Constants.Port, Constants.Version, Constants.UniqId);
     SubsonicWS.SubSystem.Ping p = new SubsonicWS.SubSystem.Ping();
     var t = p.Request();
     while (!t.IsCompleted)
         t.Wait(10);
     Assert.AreEqual(SubsonicWS.Common.ResponseStatus.Ok, p.StatusValue);
 }
 public void TestConnectionError()
 {
     ConnectionInformations.initConnection("", Constants.Password, Constants.Server, Constants.Port, Constants.Version, Constants.UniqId);
     SubsonicWS.SubSystem.Ping p = new SubsonicWS.SubSystem.Ping();
     Assert.ThrowsException<AggregateException>(() =>
     {
         var t = p.Request();
         while (!t.IsCompleted)
             t.Wait(10);
         Assert.AreEqual(SubsonicWS.Common.ResponseStatus.Ok, p.StatusValue);
     });
 }