Skip to content

Commit

Permalink
Expose the test Controller version as a static property.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanz committed Aug 3, 2016
1 parent ffd8d96 commit 1d1a8a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/Machine.Specifications/Controller/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Machine.Specifications.Controller
{
public class Controller
{
internal static readonly string PROTOCOL_VERSION = "1.0";
public static string Version => "1.0";

readonly DefaultRunner _runner;
readonly AssemblyExplorer _explorer;
Expand Down Expand Up @@ -106,7 +106,7 @@ public void RunTypes(Assembly assembly, IEnumerable<Type> types)
public string DiscoverSpecs(Assembly assembly)
{
XElement contextListElement = new XElement("contexts");
contextListElement.Add(new XAttribute("version", "1.0.0"));
contextListElement.Add(new XAttribute("version", Version));

IEnumerable<Context> contexts = _explorer.FindContextsIn(assembly);
foreach (Context context in contexts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public ControllerRunListener(Action<string> listener)

private void SendMessage(XElement message)
{
message.Add(new XAttribute("version", Controller.PROTOCOL_VERSION));
message.Add(new XAttribute("version", Controller.Version));
_listener(message.ToString());
}

Expand Down

0 comments on commit 1d1a8a6

Please sign in to comment.