mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
Lots of initialization, configuration clean up.
This commit is contained in:
parent
62013f6f87
commit
51518787d8
74 changed files with 316 additions and 279 deletions
|
@ -1,13 +1,13 @@
|
|||
using System.IO;
|
||||
using AutoMoq;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.Model;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Test.Common.AutoMoq;
|
||||
|
||||
|
||||
namespace NzbDrone.Core.Test.ProviderTests
|
||||
namespace NzbDrone.Common.Test
|
||||
{
|
||||
[TestFixture]
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
@ -23,8 +23,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
if (File.Exists(configFile))
|
||||
File.Delete(configFile);
|
||||
|
||||
Mocker.Resolve<ConfigFileProvider>().CreateDefaultConfigFile();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -133,19 +131,6 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
result.Should().Be(value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetValue_New_Key_with_new_parent()
|
||||
{
|
||||
const string key = "Hello";
|
||||
const string value = "World";
|
||||
|
||||
//Act
|
||||
var result = Mocker.Resolve<ConfigFileProvider>().GetValue(key, value, "Universe");
|
||||
|
||||
//Assert
|
||||
result.Should().Be(value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetAuthenticationType_No_Existing_Value()
|
||||
{
|
||||
|
@ -169,5 +154,17 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
//Assert
|
||||
result.Should().Be(AuthenticationType.Windows);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Guid_should_return_the_same_every_time()
|
||||
{
|
||||
//Act
|
||||
var firstResponse = Mocker.Resolve<ConfigFileProvider>().Guid;
|
||||
var secondResponse = Mocker.Resolve<ConfigFileProvider>().Guid;
|
||||
|
||||
|
||||
//Assert
|
||||
secondResponse.Should().Be(firstResponse);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
using FluentAssertions;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.App.Test
|
||||
namespace NzbDrone.Common.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class PathExtentionFixture : TestBase
|
||||
|
@ -16,7 +16,7 @@ namespace NzbDrone.App.Test
|
|||
envMoq.SetupGet(c => c.ApplicationPath).Returns(@"C:\NzbDrone\");
|
||||
|
||||
return envMoq.Object;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue