diff --git a/documentation/content/st.usage.xml b/documentation/content/st.usage.xml
index 70b770b27..85c921aac 100755
--- a/documentation/content/st.usage.xml
+++ b/documentation/content/st.usage.xml
@@ -3,48 +3,98 @@
st
- open
- Opens the specification editor web tool
-
-
- path
- Path to the StoryTeller project file or the project directory
-
-
+ doc-run
+ Run the documentation in a live mode
+
- [-b, --build <build>]
- Specify a build target to force Storyteller to choose that profile. By default, ST will use 'Debug'
+ [-d, --directory <directory>]
+ The documentation directory. The default is 'documentation'
- [-p, --profile <profile>]
- Storyteller test mode profile for systems like Serenity that use this
+ [-v, --version <version>]
+ Override the application version. Default is 'Unknown'
- [-t, --timeout <timeout>]
- Optional. Default project timeout in seconds.
+ [-p, --project <project>]
+ GitHub project name when exporting to project pages of a GitHub repo
- [-l, --lifecycle Acceptance|Regression|Any]
- Optional. Only runs tests with desired lifecyle
+ [-c, --code [<code1 code2 code3 ...>]]
+ Override the directories where sample scanning should be enabled. Default is [src]
+
+
+
+ Run the documentation in a live mode
+ st doc-run [-d, --directory <directory>] [-v, --version <version>] [-p, --project <project>] [-c, --code [<code1 code2 code3 ...>]]
+
+
+
+
+ doc-seed
+ Seeds a topic file structure from an outline.txt file
+
+
- [-z, --teamcity]
- Optional. Applies extra logging to see progress within TeamCity during CI runs
+ [-d, --directory <directory>]
+ The documentation directory. The default is 'documentation'
- [-c, --config <confi>]
- Optional. Override the config file selection of the Storyteller test running AppDomain
+ [-v, --version <version>]
+ Override the application version. Default is 'Unknown'
- [-r, --retries <retries>]
- Sets a minimum number of retry attempts for this execution
+ [-p, --project <project>]
+ GitHub project name when exporting to project pages of a GitHub repo
+
+
+ [-c, --code [<code1 code2 code3 ...>]]
+ Override the directories where sample scanning should be enabled. Default is [src]
- Opens the specification editor web tool
- st open <path> [-b, --build <build>] [-p, --profile <profile>] [-t, --timeout <timeout>] [-l, --lifecycle Acceptance|Regression|Any] [-z, --teamcity] [-c, --config <confi>] [-r, --retries <retries>]
+ Seeds a topic file structure from an outline.txt file
+ st doc-seed [-d, --directory <directory>] [-v, --version <version>] [-p, --project <project>] [-c, --code [<code1 code2 code3 ...>]]
+
+
+
+
+ doc-export
+ Export a documentation project to static html
+
+
+ destination
+ The destination folder where the docs should be exported to
+
+
+ exportmode
+ Controls how the urls within the documentation topic pages are generated
+
+
+
+
+ [-d, --directory <directory>]
+ The documentation directory. The default is 'documentation'
+
+
+ [-v, --version <version>]
+ Override the application version. Default is 'Unknown'
+
+
+ [-p, --project <project>]
+ GitHub project name when exporting to project pages of a GitHub repo
+
+
+ [-c, --code [<code1 code2 code3 ...>]]
+ Override the directories where sample scanning should be enabled. Default is [src]
+
+
+
+
+ Export a documentation project to static html
+ st doc-export <destination> FileDump|Website|ProjectWebsite [-d, --directory <directory>] [-v, --version <version>] [-p, --project <project>] [-c, --code [<code1 code2 code3 ...>]]
@@ -114,111 +164,69 @@
[-r, --retries <retries>]
Sets a minimum number of retry attempts for this execution
+
+ [-c, --culture <culture>]
+ Force Storyteller to use this culture in all value conversions
+
Execute
- st run <path> [-r, --results-path <resultspath>] [-w, --workspace <workspace>] [-e, --exclude-tags <excludetags>] [-o, --open] [-c, --csv <csv>] [-j, --json <json>] [-d, --dump <dump>] [-b, --build <build>] [-p, --profile <profile>] [-t, --timeout <timeout>] [-l, --lifecycle Acceptance|Regression|Any] [-z, --teamcity] [-c, --config <confi>] [-r, --retries <retries>]
+ st run <path> [-r, --results-path <resultspath>] [-w, --workspace <workspace>] [-e, --exclude-tags <excludetags>] [-o, --open] [-c, --csv <csv>] [-j, --json <json>] [-d, --dump <dump>] [-b, --build <build>] [-p, --profile <profile>] [-t, --timeout <timeout>] [-l, --lifecycle Acceptance|Regression|Any] [-z, --teamcity] [-c, --config <confi>] [-r, --retries <retries>] [-c, --culture <culture>]
Execute and save results
- st run <path> [-r, --results-path <resultspath>] [-w, --workspace <workspace>] [-e, --exclude-tags <excludetags>] [-o, --open] [-c, --csv <csv>] [-j, --json <json>] [-d, --dump <dump>] [-b, --build <build>] [-p, --profile <profile>] [-t, --timeout <timeout>] [-l, --lifecycle Acceptance|Regression|Any] [-z, --teamcity] [-c, --config <confi>] [-r, --retries <retries>]
+ st run <path> [-r, --results-path <resultspath>] [-w, --workspace <workspace>] [-e, --exclude-tags <excludetags>] [-o, --open] [-c, --csv <csv>] [-j, --json <json>] [-d, --dump <dump>] [-b, --build <build>] [-p, --profile <profile>] [-t, --timeout <timeout>] [-l, --lifecycle Acceptance|Regression|Any] [-z, --teamcity] [-c, --config <confi>] [-r, --retries <retries>] [-c, --culture <culture>]
- doc-run
- Run the documentation in a live mode
-
-
-
- [-d, --directory <directory>]
- The documentation directory. The default is 'documentation'
-
-
- [-v, --version <version>]
- Override the application version. Default is 'Unknown'
-
-
- [-p, --project <project>]
- GitHub project name when exporting to project pages of a GitHub repo
-
-
- [-c, --code [<code1 code2 code3 ...>]]
- Override the directories where sample scanning should be enabled. Default is [src]
-
-
-
-
- Run the documentation in a live mode
- st doc-run [-d, --directory <directory>] [-v, --version <version>] [-p, --project <project>] [-c, --code [<code1 code2 code3 ...>]]
-
-
-
-
- doc-seed
- Seeds a topic file structure from an outline.txt file
-
+ open
+ Opens the specification editor web tool
+
+
+ path
+ Path to the StoryTeller project file or the project directory
+
+
- [-d, --directory <directory>]
- The documentation directory. The default is 'documentation'
+ [-b, --build <build>]
+ Specify a build target to force Storyteller to choose that profile. By default, ST will use 'Debug'
- [-v, --version <version>]
- Override the application version. Default is 'Unknown'
+ [-p, --profile <profile>]
+ Storyteller test mode profile for systems like Serenity that use this
- [-p, --project <project>]
- GitHub project name when exporting to project pages of a GitHub repo
+ [-t, --timeout <timeout>]
+ Optional. Default project timeout in seconds.
- [-c, --code [<code1 code2 code3 ...>]]
- Override the directories where sample scanning should be enabled. Default is [src]
+ [-l, --lifecycle Acceptance|Regression|Any]
+ Optional. Only runs tests with desired lifecyle
-
-
-
- Seeds a topic file structure from an outline.txt file
- st doc-seed [-d, --directory <directory>] [-v, --version <version>] [-p, --project <project>] [-c, --code [<code1 code2 code3 ...>]]
-
-
-
-
- doc-export
- Export a documentation project to static html
-
-
- destination
- The destination folder where the docs should be exported to
-
-
- exportmode
- Controls how the urls within the documentation topic pages are generated
-
-
-
- [-d, --directory <directory>]
- The documentation directory. The default is 'documentation'
+ [-z, --teamcity]
+ Optional. Applies extra logging to see progress within TeamCity during CI runs
- [-v, --version <version>]
- Override the application version. Default is 'Unknown'
+ [-c, --config <confi>]
+ Optional. Override the config file selection of the Storyteller test running AppDomain
- [-p, --project <project>]
- GitHub project name when exporting to project pages of a GitHub repo
+ [-r, --retries <retries>]
+ Sets a minimum number of retry attempts for this execution
- [-c, --code [<code1 code2 code3 ...>]]
- Override the directories where sample scanning should be enabled. Default is [src]
+ [-c, --culture <culture>]
+ Force Storyteller to use this culture in all value conversions
- Export a documentation project to static html
- st doc-export <destination> FileDump|Website|ProjectWebsite [-d, --directory <directory>] [-v, --version <version>] [-p, --project <project>] [-c, --code [<code1 code2 code3 ...>]]
+ Opens the specification editor web tool
+ st open <path> [-b, --build <build>] [-p, --profile <profile>] [-t, --timeout <timeout>] [-l, --lifecycle Acceptance|Regression|Any] [-z, --teamcity] [-c, --config <confi>] [-r, --retries <retries>] [-c, --culture <culture>]
diff --git a/src/ST/Client/RemoteController.cs b/src/ST/Client/RemoteController.cs
index d013d58cd..9e3b07368 100644
--- a/src/ST/Client/RemoteController.cs
+++ b/src/ST/Client/RemoteController.cs
@@ -67,22 +67,13 @@ public string BinPath
set { _remoteSetup.Setup.PrivateBinPath = value; }
}
- public MessagingHub Messaging
- {
- get { return _messaging; }
- }
+ public MessagingHub Messaging => _messaging;
public void Dispose()
{
- if (_watcher != null)
- {
- _watcher.Dispose();
- }
+ _watcher?.Dispose();
- if (_proxy != null)
- {
- _proxy.Dispose();
- }
+ _proxy?.Dispose();
if (_domain != null)
{
diff --git a/src/ST/CommandLine/ProjectInput.cs b/src/ST/CommandLine/ProjectInput.cs
index 003ba9bce..b9714df18 100755
--- a/src/ST/CommandLine/ProjectInput.cs
+++ b/src/ST/CommandLine/ProjectInput.cs
@@ -43,11 +43,17 @@ public ProjectInput()
[Description("Sets a minimum number of retry attempts for this execution")]
public int RetriesFlag { get; set; }
+ [Description("Force Storyteller to use this culture in all value conversions")]
+ public string CultureFlag { get; set; }
+
public RemoteController BuildRemoteController()
{
var path = Path.ToFullPath();
var controller = new RemoteController(path);
+ controller.Project.Culture = CultureFlag;
+
+
if (BuildFlag.IsNotEmpty())
{
controller.UseBuildProfile(BuildFlag);
@@ -63,6 +69,8 @@ public RemoteController BuildRemoteController()
controller.Project.TracingStyle = "TeamCity";
}
+
+
controller.Project.MaxRetries = RetriesFlag;
controller.Project.Profile = ProfileFlag;
diff --git a/src/StoryTeller/Conversion/Conversions.cs b/src/StoryTeller/Conversion/Conversions.cs
index 5f379ffa3..4f3362c56 100755
--- a/src/StoryTeller/Conversion/Conversions.cs
+++ b/src/StoryTeller/Conversion/Conversions.cs
@@ -45,10 +45,7 @@ public Conversions()
});
}
- public IEnumerable RuntimeConvertors
- {
- get { return _runtimeConvertors; }
- }
+ public IEnumerable RuntimeConvertors => _runtimeConvertors;
public void RegisterRuntimeConversion() where T : IRuntimeConverter, new()
{
diff --git a/src/StoryTeller/Engine/SpecExecutionRequest.cs b/src/StoryTeller/Engine/SpecExecutionRequest.cs
index 0d1060d8d..763c1a91b 100755
--- a/src/StoryTeller/Engine/SpecExecutionRequest.cs
+++ b/src/StoryTeller/Engine/SpecExecutionRequest.cs
@@ -1,5 +1,8 @@
using System;
+using System.Globalization;
using System.IO;
+using System.Threading;
+using FubuCore;
using StoryTeller.Grammars;
using StoryTeller.Messages;
using StoryTeller.Model;
@@ -51,6 +54,12 @@ public void ReadXml()
public void CreatePlan(FixtureLibrary library)
{
+ var culture = Project.CurrentProject?.Culture;
+ if (culture.IsNotEmpty())
+ {
+ Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
+ }
+
performAction(() =>
{
Plan = Specification.CreatePlan(library);
diff --git a/src/StoryTeller/Engine/SpecificationEngine.cs b/src/StoryTeller/Engine/SpecificationEngine.cs
index c4fd75ff5..784118fa0 100755
--- a/src/StoryTeller/Engine/SpecificationEngine.cs
+++ b/src/StoryTeller/Engine/SpecificationEngine.cs
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Linq;
+using System.Threading;
using System.Threading.Tasks;
using FubuCore;
using StoryTeller.Model;
@@ -129,6 +131,12 @@ private void startTheConsumingQueues(FixtureLibrary library)
{
_planning = new ConsumingQueue(request =>
{
+ var culture = Project.CurrentProject?.Culture;
+ if (culture.IsNotEmpty())
+ {
+ Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
+ }
+
request.CreatePlan(library);
_executionQueue.Enqueue(request);
});
diff --git a/src/StoryTeller/Project.cs b/src/StoryTeller/Project.cs
index 58aa1db3a..5665c6e5b 100755
--- a/src/StoryTeller/Project.cs
+++ b/src/StoryTeller/Project.cs
@@ -32,6 +32,7 @@ public static int CurrentMaxRetries
public string Profile { get; set; }
public static Project CurrentProject { get; set; }
public int MaxRetries { get; set; }
+ public string Culture { get; set; }
public StopConditions StopConditions = new StopConditions();