From d1a4c7c942420b0541bae7e1d5ef6a7ff4222d34 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Fri, 20 Sep 2013 17:18:11 -0700 Subject: [PATCH] something! --- NzbDrone.Core.Test/NzbDrone.Core.Test.csproj | 1 + .../ThingiProvider/ProviderBaseFixture.cs | 23 +++++++++ NzbDrone.Core/NzbDrone.Core.csproj | 1 + NzbDrone.Core/ThingiProvider/ProviderBase.cs | 49 +++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 NzbDrone.Core.Test/ThingiProvider/ProviderBaseFixture.cs create mode 100644 NzbDrone.Core/ThingiProvider/ProviderBase.cs diff --git a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 58b09e81e..430b4d934 100644 --- a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -181,6 +181,7 @@ + diff --git a/NzbDrone.Core.Test/ThingiProvider/ProviderBaseFixture.cs b/NzbDrone.Core.Test/ThingiProvider/ProviderBaseFixture.cs new file mode 100644 index 000000000..11006aa42 --- /dev/null +++ b/NzbDrone.Core.Test/ThingiProvider/ProviderBaseFixture.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 + { + [Test] + public void should_read_write_download_provider() + { + var model = new DownloadProviderModel(); + + model.Config = new DownloadProviderConfig(); + + //Subject.Insert(new ) + } + + + } +} \ No newline at end of file diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 23d3657e3..2ab111e2a 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -416,6 +416,7 @@ + diff --git a/NzbDrone.Core/ThingiProvider/ProviderBase.cs b/NzbDrone.Core/ThingiProvider/ProviderBase.cs new file mode 100644 index 000000000..61035d7de --- /dev/null +++ b/NzbDrone.Core/ThingiProvider/ProviderBase.cs @@ -0,0 +1,49 @@ + +using NzbDrone.Core.Datastore; +using NzbDrone.Core.Messaging.Events; + +namespace NzbDrone.Core.ThingiProvider +{ + + + public class DownloadProviderRepository : BasicRepository + { + public DownloadProviderRepository(IDatabase database, IEventAggregator eventAggregator) + : base(database, eventAggregator) + { + } + } + + public class DownloadProviderModel : Provider + { + + } + + public class DownloadProviderConfig : ProviderSetting + { + + } + + + public abstract class Provider : ModelBase + where TSettings : ProviderSetting + { + public string Implementation { get; set; } + public TSettings Config { get; set; } + } + + public abstract class ProviderSetting : IEmbeddedDocument + { + + } + + public abstract class ProviderBase where TSettings : ProviderSetting + { + public TSettings Settings { get; private set; } + + public void LoadSettings(TSettings setting) + { + Settings = setting; + } + } +} \ No newline at end of file