1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 18:42:42 +01:00
Radarr/NzbDrone.Common.Test/PathExtentionFixture.cs

54 lines
1.4 KiB
C#
Raw Normal View History

2011-11-13 08:27:16 +01:00
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Common;
2011-11-13 19:16:31 +01:00
using NzbDrone.Test.Common;
2011-11-13 08:27:16 +01:00
namespace NzbDrone.App.Test
{
[TestFixture]
2011-11-13 19:16:31 +01:00
public class PathExtentionFixture : TestBase
2011-11-13 08:27:16 +01:00
{
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");
}
}
}