mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-24 14:27:06 -04:00
New: Better platform detection specifically for Non-Windows Systems
This commit is contained in:
parent
598b5322b7
commit
ad7d571b24
76 changed files with 1125 additions and 473 deletions
|
@ -0,0 +1,19 @@
|
|||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Windows.EnvironmentInfo;
|
||||
|
||||
namespace NzbDrone.Windows.Test.EnvironmentInfo
|
||||
{
|
||||
[TestFixture]
|
||||
[Platform("Win")]
|
||||
public class DotNetPlatformInfoFixture : TestBase<DotNetPlatformInfo>
|
||||
{
|
||||
[Test]
|
||||
public void should_get_framework_version()
|
||||
{
|
||||
Subject.Version.Major.Should().Be(4);
|
||||
Subject.Version.Minor.Should().BeOneOf(0, 5, 6);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Windows.EnvironmentInfo;
|
||||
|
||||
namespace NzbDrone.Windows.Test.EnvironmentInfo
|
||||
{
|
||||
[TestFixture]
|
||||
[Platform("Win")]
|
||||
public class WindowsVersionInfoFixture : TestBase<WindowsVersionInfo>
|
||||
{
|
||||
[Test]
|
||||
public void should_get_windows_version()
|
||||
{
|
||||
var info = Subject.Read();
|
||||
info.Version.Should().NotBeNullOrWhiteSpace();
|
||||
info.Name.Should().Contain("Windows");
|
||||
info.FullName.Should().Contain("Windows");
|
||||
info.FullName.Should().Contain("NT");
|
||||
info.FullName.Should().Contain(info.Version);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -73,6 +73,8 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="DiskProviderTests\DiskProviderFixture.cs" />
|
||||
<Compile Include="DiskProviderTests\FreeSpaceFixture.cs" />
|
||||
<Compile Include="EnvironmentInfo\WindowsVersionInfoFixture.cs" />
|
||||
<Compile Include="EnvironmentInfo\DotNetPlatformInfoFixture.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue