mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Refactor code, update namespaces
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Podsync.Tests.Controllers
|
||||
[InlineData("http://youtube.com", null, 0)]
|
||||
[InlineData("http://youtube.com", null, 25)]
|
||||
[InlineData("http://youtube.com", null, 151)]
|
||||
public async Task ValidateCreateTest(string url, ResolveType? quality, int? pageSize)
|
||||
public async Task ValidateCreateTest(string url, ResolveFormat? quality, int? pageSize)
|
||||
{
|
||||
var feed = new CreateFeedRequest
|
||||
{
|
||||
@@ -42,7 +42,7 @@ namespace Podsync.Tests.Controllers
|
||||
var feed = new CreateFeedRequest
|
||||
{
|
||||
Url = "https://www.youtube.com/channel/UCKy1dAqELo0zrOtPkf0eTMw",
|
||||
Quality = ResolveType.AudioLow,
|
||||
Quality = ResolveFormat.AudioLow,
|
||||
};
|
||||
|
||||
var response = await Client.PostAsync("/feed/create", MakeHttpContent(feed));
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Podsync.Tests.Services.Patreon
|
||||
|
||||
private Tokens Tokens => Configuration.CreatorTokens;
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip = "Run manually with access token")]
|
||||
public async Task FetchProfileTest()
|
||||
{
|
||||
var user = await _api.FetchUserAndPledges(Tokens);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Podsync.Tests.Services.Resolver
|
||||
[Fact]
|
||||
public async Task ResolveOutputTest()
|
||||
{
|
||||
var downloadUrl = await _resolver.Resolve(new Uri("https://www.youtube.com/watch?v=-csRxRj_zcw&t=45s"), ResolveType.AudioHigh);
|
||||
var downloadUrl = await _resolver.Resolve(new Uri("https://www.youtube.com/watch?v=-csRxRj_zcw&t=45s"), ResolveFormat.AudioHigh);
|
||||
Assert.True(downloadUrl.IsAbsoluteUri);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Podsync.Services.Feed;
|
||||
using Podsync.Services.Rss.Feed;
|
||||
using Xunit;
|
||||
|
||||
namespace Podsync.Tests.Services.Feed
|
||||
namespace Podsync.Tests.Services.Rss.Feed
|
||||
{
|
||||
public class FeedSerializationTests
|
||||
{
|
||||
@@ -13,7 +13,7 @@ namespace Podsync.Tests.Services.Feed
|
||||
[Fact]
|
||||
public void SerializeFeedTest()
|
||||
{
|
||||
var feed = new Rss();
|
||||
var feed = new Podsync.Services.Rss.Feed.Rss();
|
||||
|
||||
var item = new Item
|
||||
{
|
||||
@@ -50,7 +50,7 @@ namespace Podsync.Tests.Services.Feed
|
||||
channel
|
||||
};
|
||||
|
||||
var serializer = new XmlSerializer(typeof(Rss));
|
||||
var serializer = new XmlSerializer(typeof(Podsync.Services.Rss.Feed.Rss));
|
||||
|
||||
string body;
|
||||
using (var writer = new StringWriter())
|
||||
@@ -2,13 +2,13 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Moq;
|
||||
using Podsync.Services.Builder;
|
||||
using Podsync.Services.Links;
|
||||
using Podsync.Services.Rss;
|
||||
using Podsync.Services.Storage;
|
||||
using Podsync.Services.Videos.Vimeo;
|
||||
using Xunit;
|
||||
|
||||
namespace Podsync.Tests.Services.Builder
|
||||
namespace Podsync.Tests.Services.Rss
|
||||
{
|
||||
public class VimeoRssBuilderTests : TestBase
|
||||
{
|
||||
@@ -2,13 +2,13 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Moq;
|
||||
using Podsync.Services.Builder;
|
||||
using Podsync.Services.Links;
|
||||
using Podsync.Services.Rss;
|
||||
using Podsync.Services.Storage;
|
||||
using Podsync.Services.Videos.YouTube;
|
||||
using Xunit;
|
||||
|
||||
namespace Podsync.Tests.Services.Builder
|
||||
namespace Podsync.Tests.Services.Rss
|
||||
{
|
||||
public class YouTubeRssBuilderTests : TestBase
|
||||
{
|
||||
Reference in New Issue
Block a user