mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Alot of refactoring.
This commit is contained in:
parent
2e94e322f4
commit
72d0fc50ed
89 changed files with 503 additions and 767 deletions
52
NzbDrone.Common.Test/PathExtentionFixture.cs
Normal file
52
NzbDrone.Common.Test/PathExtentionFixture.cs
Normal file
|
@ -0,0 +1,52 @@
|
|||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
|
||||
namespace NzbDrone.App.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class PathExtentionFixture
|
||||
{
|
||||
|
||||
private EnviromentProvider GetEnviromentProvider()
|
||||
{
|
||||
var envMoq = new Mock<EnviromentProvider>();
|
||||
envMoq.SetupGet(c => c.ApplicationPath).Returns(@"C:\NzbDrone\");
|
||||
|
||||
return envMoq.Object;
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void AppDataDirectory_path_test()
|
||||
{
|
||||
GetEnviromentProvider().GetAppDataPath().Should().BeEquivalentTo(@"C:\NzbDrone\NzbDrone.Web\App_Data\");
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Config_path_test()
|
||||
{
|
||||
GetEnviromentProvider().GetConfigPath().Should().BeEquivalentTo(@"C:\NzbDrone\Config.xml");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IISConfig_path_test()
|
||||
{
|
||||
GetEnviromentProvider().GetIISConfigPath().Should().BeEquivalentTo(@"C:\NzbDrone\IISExpress\AppServer\applicationhost.config");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IISExe_path_test()
|
||||
{
|
||||
GetEnviromentProvider().GetIISExe().Should().BeEquivalentTo(@"C:\NzbDrone\IISExpress\IISExpress.exe");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void NlogConfig_path_test()
|
||||
{
|
||||
GetEnviromentProvider().GetNlogConfigPath().Should().BeEquivalentTo(@"C:\NzbDrone\NzbDrone.Web\log.config");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue