Exemplo n.º 1
0
        public async Task ResourceCollection_GetAll_ReturnsValidList()
        {
            // Arrange
            var resourceDiscoveryClient = new ResourceDiscoveryClient(Configuration, Logger);

            // Act
            var response = await resourceDiscoveryClient.GetResourceCollectionsAsync();

            // Assert
            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
            var rawResponseBody = await response.Content.ReadAsStringAsync();

            Assert.NotEmpty(rawResponseBody);
            var resourceCollections = JsonConvert.DeserializeObject <List <ResourceCollection> >(rawResponseBody);

            Assert.NotNull(resourceCollections);
            Assert.NotEmpty(resourceCollections);
        }