-
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
dd4a4ac
commit bd84b24
Showing
9 changed files
with
79 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
**/.vs | ||
**/bin | ||
**/obj | ||
source/SpecGurka/appsettings.json | ||
source/GenGurka/App.config | ||
**/TestResults | ||
**/TestResults | ||
source/SyncGurka/appsettings.json |
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
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,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SpecGurka.GurkaSpec | ||
{ | ||
public class Background | ||
{ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Xml.Serialization; | ||
using System.Xml; | ||
|
||
namespace SpecGurka.GurkaSpec | ||
{ | ||
public class Gurka | ||
{ | ||
public static Testrun ReadGurkaFile(string path) | ||
{ | ||
var xml = System.IO.File.ReadAllText(path); | ||
XmlSerializer serializer = new XmlSerializer(typeof(Testrun)); | ||
Testrun result; | ||
using (TextReader reader = new StringReader(xml)) | ||
{ | ||
result = (Testrun)serializer.Deserialize(reader); | ||
} | ||
return result; | ||
} | ||
|
||
public static void WriteGurkaFile(string path, Testrun testrun) | ||
{ | ||
XmlSerializer xsSubmit = new XmlSerializer(typeof(Testrun)); | ||
var xml = ""; | ||
|
||
using (var sww = new StringWriter()) | ||
{ | ||
using (XmlWriter writer = XmlWriter.Create(sww)) | ||
{ | ||
xsSubmit.Serialize(writer, testrun); | ||
xml = sww.ToString(); // Your XML | ||
} | ||
} | ||
|
||
System.IO.File.WriteAllText($"{path}testrun_{DateTime.UtcNow.ToString("s").Replace(':', '_')}.gurka", xml); | ||
} | ||
} | ||
} |
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,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SpecGurka.GurkaSpec | ||
{ | ||
public class Rule | ||
{ | ||
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
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