/// <summary>
        /// Method for running a resource list test.
        /// </summary>
        /// <param name="expectedCount">The expected resource count.</param>
        private static async Task GetsResourceList <T>(int expectedCount) where T : NamedApiObject
        {
            var t = await DataFetcher.GetResourceList <NamedApiResource <T>, T>();

            Assert.NotNull(t);
            Assert.Equal(expectedCount, t.Count);

            var enumerator = t.GetEnumerator();
            var enumCount  = 0;

            while (enumerator.MoveNext())
            {
                enumCount++;
            }

            Assert.Equal(expectedCount, enumCount);

            enumerator.Dispose();
        }