-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When specflow.json is not available, use config from App.config Fix #162
- Loading branch information
Showing
10 changed files
with
217 additions
and
89 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/dotnet/ReSharperPlugin.SpecflowRiderPlugin/Caching/SpecflowJsonSettings/ConfigSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace ReSharperPlugin.SpecflowRiderPlugin.Caching.SpecflowJsonSettings; | ||
|
||
public enum ConfigSource | ||
{ | ||
None, | ||
Json, | ||
AppConfig | ||
} |
11 changes: 8 additions & 3 deletions
11
...tnet/ReSharperPlugin.SpecflowRiderPlugin/Caching/SpecflowJsonSettings/SpecflowSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
using System.Xml.Serialization; | ||
|
||
namespace ReSharperPlugin.SpecflowRiderPlugin.Caching.SpecflowJsonSettings | ||
{ | ||
[XmlRoot("specFlow")] | ||
public class SpecflowSettings | ||
{ | ||
public SpecflowSettingsLanguage Language { get; } = new SpecflowSettingsLanguage(); | ||
public SpecflowSettingsBindingCulture BindingCulture { get; } = new SpecflowSettingsBindingCulture(); | ||
[XmlElement("language")] | ||
public SpecflowSettingsLanguage Language { get; set; } = new(); | ||
[XmlElement("bindingCulture")] | ||
public SpecflowSettingsBindingCulture BindingCulture { get; set; } = new(); | ||
|
||
public SpecflowSettings() | ||
{ | ||
Language.Feature = "en"; | ||
Language.Tool = "en"; | ||
BindingCulture.Name = "en"; | ||
} | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...Plugin.SpecflowRiderPlugin/Caching/SpecflowJsonSettings/SpecflowSettingsBindingCulture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
using System.Xml.Serialization; | ||
|
||
namespace ReSharperPlugin.SpecflowRiderPlugin.Caching.SpecflowJsonSettings | ||
{ | ||
public class SpecflowSettingsBindingCulture | ||
{ | ||
[XmlAttribute("name")] | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
...harperPlugin.SpecflowRiderPlugin/Caching/SpecflowJsonSettings/SpecflowSettingsLanguage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
using System.Xml.Serialization; | ||
|
||
namespace ReSharperPlugin.SpecflowRiderPlugin.Caching.SpecflowJsonSettings | ||
{ | ||
public class SpecflowSettingsLanguage | ||
{ | ||
private string _neutralFeature; | ||
|
||
[XmlAttribute("feature")] | ||
public string Feature { get; set; } | ||
[XmlAttribute("tool")] | ||
public string Tool { get; set; } | ||
|
||
public string NeutralFeature => _neutralFeature ?? (_neutralFeature = Feature.Split('-')[0]); | ||
public string NeutralFeature => _neutralFeature ??= Feature.Split('-')[0]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.