Exemple #1
0
 public async Task EnsureGetAllMixesReturnsItems()
 {
     IMusicClient client = new MusicClient("test", "gb", new MockApiRequestHandler(Resources.allmixes));
     ListResponse<Mix> result = await client.GetAllMixesAsync();
     Assert.IsNotNull(result, "Expected a result");
     Assert.IsNotNull(result.StatusCode, "Expected a status code");
     Assert.IsTrue(result.StatusCode.HasValue, "Expected a status code");
     Assert.AreEqual(HttpStatusCode.OK, result.StatusCode.Value, "Expected a 200 response");
     Assert.IsNotNull(result.Result, "Expected a list of results");
     Assert.IsNull(result.Error, "Expected no error");
     Assert.Greater(result.Result.Count, 0, "Expected more than 0 results");
 }
Exemple #2
0
        public async Task EnsureGetAllMixesReturnsItems()
        {
            IMusicClient       client = new MusicClient("test", "gb", new MockApiRequestHandler(Resources.allmixes));
            ListResponse <Mix> result = await client.GetAllMixesAsync();

            Assert.IsNotNull(result, "Expected a result");
            Assert.IsNotNull(result.StatusCode, "Expected a status code");
            Assert.IsTrue(result.StatusCode.HasValue, "Expected a status code");
            Assert.AreEqual(HttpStatusCode.OK, result.StatusCode.Value, "Expected a 200 response");
            Assert.IsNotNull(result.Result, "Expected a list of results");
            Assert.IsNull(result.Error, "Expected no error");
            Assert.Greater(result.Result.Count, 0, "Expected more than 0 results");
        }