public static void InitTests(TestContext testContext)
        {
            var configBuilder = new ConfigurationBuilder()
                                .AddUserSecrets <AuthenticationTests>();
            var configuration = configBuilder.Build();

            client = new GPodderClient(configuration["GpodderUsername"], configuration["GPodderPassword"]);
        }
Esempio n. 2
0
        public static async Task InitTests(TestContext testContext)
        {
            var configBuilder = new ConfigurationBuilder()
                                .AddUserSecrets <SubscriptionsTests>();
            var configuration = configBuilder.Build();

            client = new GPodderClient(configuration["GpodderUsername"], configuration["GpodderPassword"]);
            await client.Authentication.Login();
        }
Esempio n. 3
0
        public void TestLogin()
        {
            var client = new GPodderClient();

            Task.Run(async() =>
            {
                await client.Authentication.Login(this.username, this.password);
            }).GetAwaiter().GetResult();
        }
Esempio n. 4
0
        public void TestGetPodcastsWithTag(string tag)
        {
            var client = new GPodderClient();

            Task.Run(async() =>
            {
                var podcastCollection = await client.Directory.GetPodcastsWithTag(tag);
                Assert.IsNotNull(podcastCollection);
            }).GetAwaiter().GetResult();
        }
Esempio n. 5
0
        public void TestGetTopPodcasts()
        {
            var client = new GPodderClient();

            Task.Run(async() =>
            {
                var topPodcastCollection = await client.Directory.GetTopPodcasts(50);
                Assert.IsNotNull(topPodcastCollection);
            }).GetAwaiter().GetResult();
        }
Esempio n. 6
0
        public void TestGetPodcastsWithTagCount()
        {
            var client = new GPodderClient();

            Task.Run(async() =>
            {
                var podcastCollection = await client.Directory.GetPodcastsWithTag("information", count: 1);
                Assert.IsNotNull(podcastCollection);
                Assert.IsTrue(podcastCollection.Count() <= 1);
            }).GetAwaiter().GetResult();
        }
Esempio n. 7
0
        public void TestGetTagsCount()
        {
            var requestedCount = 5;
            var client         = new GPodderClient();

            Task.Run(async() =>
            {
                var tagsCollection = await client.Directory.GetTags(requestedCount);
                Assert.IsNotNull(tagsCollection);
                Assert.IsTrue(tagsCollection.Count() <= requestedCount);
            }).GetAwaiter().GetResult();
        }
Esempio n. 8
0
 public static void InitTests(TestContext testContext)
 {
     client = new GPodderClient();
 }