-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd84b24
commit 7e965bd
Showing
7 changed files
with
175 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SpecGurka.GenGurka | ||
{ | ||
internal class TestProject | ||
{ | ||
public string GherkinFile { get { return ConfigurationManager.AppSettings["gherkinfile"]; } } | ||
public string AssemblyFile { get { return ConfigurationManager.AppSettings["assemblyfile"]; } } | ||
|
||
public string TestResultFile { get { return ConfigurationManager.AppSettings["trxfile"]; } } | ||
|
||
|
||
|
||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,62 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Xml.Serialization; | ||
|
||
namespace SpecGurka.GurkaSpec | ||
{ | ||
public class Rule | ||
{ | ||
public string Name { get; set; } | ||
|
||
public bool TestsPassed { get | ||
{ | ||
bool testsPassed = true; | ||
foreach(var scenario in Scenarios) | ||
{ | ||
if (!scenario.TestPassed) | ||
{ | ||
testsPassed = false; | ||
break; | ||
} | ||
} | ||
|
||
return testsPassed; | ||
} | ||
set { } } | ||
|
||
private TimeSpan testDuration; | ||
[XmlIgnore] | ||
public TimeSpan TestDurationTime | ||
{ | ||
get | ||
{ | ||
testDuration = TimeSpan.Zero; | ||
foreach (var scenario in Scenarios) | ||
{ | ||
testDuration = testDuration.Add(scenario.TestDurationTime); | ||
} | ||
|
||
return testDuration; | ||
} | ||
set { } | ||
} | ||
|
||
public string TestDuration | ||
{ | ||
get { return TestDurationTime.ToString("G"); } | ||
set { } | ||
} | ||
|
||
public List<Scenario> Scenarios { get; set; } = new List<Scenario>(); | ||
|
||
public Scenario GetScenario(string name) | ||
{ | ||
var scenario = Scenarios.FirstOrDefault(s => s.Name == name); | ||
return scenario; | ||
} | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.