Exemplo n.º 1
0
        public async Task GetAll_ReturnsNull_WhenNotValid()
        {
            var client = new RESTClient("https://jsonplaceholder.typicode.com");
            var posts  = await client.GetAll <BlogPost>("invalid_posts");

            Assert.Null(posts);
        }
Exemplo n.º 2
0
        public async Task GetAll_ReturnsArray_WhenValid()
        {
            var client = new RESTClient("https://jsonplaceholder.typicode.com");
            var posts  = await client.GetAll <BlogPost>("posts");

            Assert.NotNull(posts);
            Assert.Greater(posts.Count, 80);
        }