Lots of initialization, configuration clean up.

This commit is contained in:
kay.one 2011-11-13 16:22:18 -08:00
commit 51518787d8
74 changed files with 316 additions and 279 deletions

View file

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