Ejemplo n.º 1
0
        public async Task ThrowsAuthenticationException()
        {
            var baelorClient = new BaelorClient();
            var ex           = await Assert.ThrowsAsync <AuthenticationRequiredException>(
                async() => await baelorClient.Albums());

            Assert.Equal("This endpoint requires an Api Key to authenticate.", ex.Message);
        }
Ejemplo n.º 2
0
        public async Task ReturnsOneOrMoreAlbum()
        {
            var apiKey       = Environment.GetEnvironmentVariable("BAELOR_TEST_KEY");
            var baelorClient = new BaelorClient(apiKey);
            var albums       = await baelorClient.Albums();

            Assert.NotEmpty(albums);
        }