mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
More code to support service, isn't working yet. (Console still works fine)
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using FluentAssertions;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Providers;
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<Compile Include="AutoMoq\AutoMoqerTest.cs" />
|
||||
<Compile Include="AutoMoq\Unity\AutoMockingBuilderStrategy.cs" />
|
||||
<Compile Include="AutoMoq\Unity\AutoMockingContainerExtension.cs" />
|
||||
<Compile Include="ProgramTest.cs" />
|
||||
<Compile Include="MonitoringProviderTest.cs" />
|
||||
<Compile Include="ConfigProviderTest.cs" />
|
||||
<Compile Include="IISProviderTest.cs" />
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Providers;
|
||||
|
||||
namespace NzbDrone.App.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class ProgramTest
|
||||
{
|
||||
|
||||
[TestCase(null, ApplicationMode.Console)]
|
||||
[TestCase("", ApplicationMode.Console)]
|
||||
[TestCase("1", ApplicationMode.Help)]
|
||||
[TestCase("ii", ApplicationMode.Help)]
|
||||
[TestCase("uu", ApplicationMode.Help)]
|
||||
[TestCase("i", ApplicationMode.InstallService)]
|
||||
[TestCase("I", ApplicationMode.InstallService)]
|
||||
[TestCase("/I", ApplicationMode.InstallService)]
|
||||
[TestCase("/i", ApplicationMode.InstallService)]
|
||||
[TestCase("-I", ApplicationMode.InstallService)]
|
||||
[TestCase("-i", ApplicationMode.InstallService)]
|
||||
[TestCase("u", ApplicationMode.UninstallService)]
|
||||
[TestCase("U", ApplicationMode.UninstallService)]
|
||||
[TestCase("/U", ApplicationMode.UninstallService)]
|
||||
[TestCase("/u", ApplicationMode.UninstallService)]
|
||||
[TestCase("-U", ApplicationMode.UninstallService)]
|
||||
[TestCase("-u", ApplicationMode.UninstallService)]
|
||||
public void GetApplicationMode_single_arg(string arg, ApplicationMode mode)
|
||||
{
|
||||
Console.GetApplicationMode(new[] { arg }).Should().Be(mode);
|
||||
}
|
||||
|
||||
[TestCase("", "", ApplicationMode.Console)]
|
||||
[TestCase("", null, ApplicationMode.Console)]
|
||||
[TestCase("i", "n", ApplicationMode.Help)]
|
||||
public void GetApplicationMode_two_args(string a, string b, ApplicationMode mode)
|
||||
{
|
||||
Console.GetApplicationMode(new[] { a, b }).Should().Be(mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user