1
0
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:
Maksym Pavlenko
2017-01-09 15:44:14 -08:00
parent 395b50b6fb
commit 8fcdb6ec00
24 changed files with 57 additions and 60 deletions

View File

@@ -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));

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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())

View File

@@ -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
{

View File

@@ -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
{