using FizzWare.NBuilder; using FluentAssertions; using NUnit.Framework; using NzbDrone.Core.Indexers; using NzbDrone.Core.Indexers.Newznab; 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 = Builder.CreateNew().BuildNew(); var newznabSettings = Builder.CreateNew().Build(); model.Settings = newznabSettings; Subject.Insert(model); var storedProvider = Subject.Single(); storedProvider.Settings.Should().BeOfType(); var storedSetting = (NewznabSettings)storedProvider.Settings; storedSetting.ShouldHave().AllProperties().EqualTo(newznabSettings); } } }