NzbDrone Update no longer opens console/browser.

This commit is contained in:
Keivan Beigi 2013-07-08 17:47:09 -07:00
commit 34f3ee6b4b
18 changed files with 137 additions and 85 deletions

View file

@ -0,0 +1,30 @@
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Test.Common;
namespace NzbDrone.Common.Test.EnvironmentTests
{
[TestFixture]
public class StartupArgumentsFixture : TestBase
{
[Test]
public void empty_array_should_return_empty_flags()
{
var args = new StartupArguments(new string[0]);
args.Flags.Should().BeEmpty();
}
[TestCase("/t")]
[TestCase(" /t")]
[TestCase(" /T")]
[TestCase(" /t ")]
public void should_parse_single_flag(string arg)
{
var args = new StartupArguments(new[] { arg });
args.Flags.Should().HaveCount(1);
args.Flags.Contains("t").Should().BeTrue();
}
}
}

View file

@ -82,6 +82,7 @@
<Compile Include="CacheTests\CachedFixture.cs" />
<Compile Include="ConfigFileProviderTest.cs" />
<Compile Include="EnsureTest\PathExtensionFixture.cs" />
<Compile Include="EnvironmentTests\StartupArgumentsFixture.cs" />
<Compile Include="EnvironmentTests\EnviromentProviderTest.cs" />
<Compile Include="EventingTests\MessageAggregatorCommandTests.cs" />
<Compile Include="EventingTests\MessageAggregatorEventTests.cs" />
@ -124,7 +125,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="EnviromentTests\" />
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -13,10 +13,9 @@ namespace NzbDrone.Common.Test
[SetUp]
public void setup()
{
Mocker.SetConstant(MainAppContainerBuilder.BuildContainer());
Mocker.SetConstant(MainAppContainerBuilder.BuildContainer(new string[0]));
}
[Test]
public void event_handlers_should_be_unique()
{