something!

This commit is contained in:
Keivan Beigi 2013-09-20 17:18:11 -07:00 committed by kayone
parent 6a10382e7b
commit d1a4c7c942
4 changed files with 74 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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