Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Properly handling Display Info case where no test assemblies were det…

…ected
  • Loading branch information...
commit ec3f666299a6cc6278f32b67d1fd5b6015409199 1 parent 7db7370
@codereflection authored
View
8 src/Giles/Program.cs
@@ -234,14 +234,16 @@ static void DisplayConfig()
static string GetTestAssemblyListAsString()
{
- return config.TestAssemblies.Aggregate((next, working) => working = working + Environment.NewLine + "\t" + next);
+ return !config.TestAssemblies.Any() ?
+ "No test assemblies detected." :
+ config.TestAssemblies.Aggregate((next, working) => working + Environment.NewLine + "\t" + next);
}
static string GetTestFilterListAsString()
{
- return config.Filters.Count == 0
+ return !config.Filters.Any()
? "<All Classes>"
- : config.Filters.Aggregate((next, working) => working = working + Environment.NewLine + "\t" + next);
+ : config.Filters.Aggregate((next, working) => working + Environment.NewLine + "\t" + next);
}
static void DisplayInteractiveMenuOptions()
View
7 src/Runners/Giles.Runner.NSpec/NSpecRunner.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using Giles.Core.Runners;
using System.Reflection;
@@ -18,10 +17,10 @@ public SessionResults RunAssembly(Assembly assembly, IEnumerable<string> filters
{
var sessionResults = new SessionResults();
var tags = string.Empty;
- if (filters.Count() > 0)
+ if (!filters.Any())
tags = filters.Aggregate((working, next) => working + "," + next);
var runner = new RunnerInvocation(assembly.Location, tags, new GilesSessionResultsFormatter(sessionResults), false);
- var runResults = runner.Run();
+ runner.Run();
return sessionResults;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.