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

            client = new GPodderClient(configuration["GpodderUsername"], configuration["GPodderPassword"]);
        }
        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();
        }
Exemple #3
0
        public void TestLogin()
        {
            var client = new GPodderClient();

            Task.Run(async() =>
            {
                await client.Authentication.Login(this.username, this.password);
            }).GetAwaiter().GetResult();
        }
Exemple #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();
        }
Exemple #5
0
        public void TestGetTopPodcasts()
        {
            var client = new GPodderClient();

            Task.Run(async() =>
            {
                var topPodcastCollection = await client.Directory.GetTopPodcasts(50);
                Assert.IsNotNull(topPodcastCollection);
            }).GetAwaiter().GetResult();
        }
Exemple #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();
        }
Exemple #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();
        }
Exemple #8
0
 public static void InitTests(TestContext testContext)
 {
     client = new GPodderClient();
 }