Example #1
0
        public async Task FailPing()
        {
            var s = new PhonePimpSession(failEndpoint);

            await ThrowsExceptionAsync <ServerResponseException>(async() => {
                await s.PingAuth();
            });
        }
Example #2
0
        private async Task TestHttpExceptions()
        {
            var session = new PhonePimpSession(new MusicEndpoint("10.0.0.123", "secret"));

            try {
                Output = "Pinging...";
                await session.Ping();
            } catch (Exception e) {
                Output = "" + e.GetType() + ": " + e.Message;
            }
        }
Example #3
0
        private async Task GzipVsNoGzip(bool compression)
        {
            var s = new PhonePimpSession(testEndpoint, acceptCompression: compression);

            var duration = await Measured(async() => {
                await s.RootContentAsync();
            });

            string withOrWithout = null;

            if (compression)
            {
                withOrWithout = "with";
            }
            else
            {
                withOrWithout = "without";
            }
            Output = "Ran " + withOrWithout + " compression in " + duration + " ms.";
        }
Example #4
0
 public async Task LoadFolders()
 {
     var s       = new PhonePimpSession(localEndpoint);
     var folders = await s.RootContentAsync();
 }