pull/3113/head
Keivan Beigi 11 years ago committed by kayone
parent 6a10382e7b
commit d1a4c7c942

@ -181,6 +181,7 @@
<Compile Include="ProviderTests\RecycleBinProviderTests\DeleteDirectoryFixture.cs" /> <Compile Include="ProviderTests\RecycleBinProviderTests\DeleteDirectoryFixture.cs" />
<Compile Include="NotificationTests\PlexProviderTest.cs" /> <Compile Include="NotificationTests\PlexProviderTest.cs" />
<Compile Include="Housekeeping\Housekeepers\CleanupOrphanedEpisodesFixture.cs" /> <Compile Include="Housekeeping\Housekeepers\CleanupOrphanedEpisodesFixture.cs" />
<Compile Include="ThingiProvider\ProviderBaseFixture.cs" />
<Compile Include="TvTests\RefreshEpisodeServiceFixture.cs" /> <Compile Include="TvTests\RefreshEpisodeServiceFixture.cs" />
<Compile Include="TvTests\EpisodeProviderTests\HandleEpisodeFileDeletedFixture.cs" /> <Compile Include="TvTests\EpisodeProviderTests\HandleEpisodeFileDeletedFixture.cs" />
<Compile Include="TvTests\EpisodeRepositoryTests\FindEpisodeFixture.cs" /> <Compile Include="TvTests\EpisodeRepositoryTests\FindEpisodeFixture.cs" />

@ -0,0 +1,23 @@
using NUnit.Framework;
using NzbDrone.Core.Test.Datastore;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.ThingiProvider;
namespace NzbDrone.Core.Test.ThingiProvider
{
public class ProviderRepositoryFixture : DbTest<DownloadProviderRepository, DownloadProviderModel>
{
[Test]
public void should_read_write_download_provider()
{
var model = new DownloadProviderModel();
model.Config = new DownloadProviderConfig();
//Subject.Insert(new )
}
}
}

@ -416,6 +416,7 @@
<Compile Include="Parser\Parser.cs" /> <Compile Include="Parser\Parser.cs" />
<Compile Include="Parser\ParsingService.cs" /> <Compile Include="Parser\ParsingService.cs" />
<Compile Include="Parser\QualityParser.cs" /> <Compile Include="Parser\QualityParser.cs" />
<Compile Include="ThingiProvider\ProviderBase.cs" />
<Compile Include="Qualities\QualityProfileInUseException.cs" /> <Compile Include="Qualities\QualityProfileInUseException.cs" />
<Compile Include="Qualities\QualitySizeRepository.cs" /> <Compile Include="Qualities\QualitySizeRepository.cs" />
<Compile Include="Qualities\QualityProfileRepository.cs" /> <Compile Include="Qualities\QualityProfileRepository.cs" />

@ -0,0 +1,49 @@

using NzbDrone.Core.Datastore;
using NzbDrone.Core.Messaging.Events;
namespace NzbDrone.Core.ThingiProvider
{
public class DownloadProviderRepository : BasicRepository<DownloadProviderModel>
{
public DownloadProviderRepository(IDatabase database, IEventAggregator eventAggregator)
: base(database, eventAggregator)
{
}
}
public class DownloadProviderModel : Provider<DownloadProviderConfig>
{
}
public class DownloadProviderConfig : ProviderSetting
{
}
public abstract class Provider<TSettings> : ModelBase
where TSettings : ProviderSetting
{
public string Implementation { get; set; }
public TSettings Config { get; set; }
}
public abstract class ProviderSetting : IEmbeddedDocument
{
}
public abstract class ProviderBase<TSettings> where TSettings : ProviderSetting
{
public TSettings Settings { get; private set; }
public void LoadSettings(TSettings setting)
{
Settings = setting;
}
}
}
Loading…
Cancel
Save