mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-28 23:06:43 -04:00
New: Better platform detection specifically for Non-Windows Systems
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user