File tree Expand file tree Collapse file tree 4 files changed +364
-25
lines changed
Expand file tree Collapse file tree 4 files changed +364
-25
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Globalization ;
34using System . Linq ;
45using System . Net ;
56using System . Text ;
@@ -45,7 +46,7 @@ private void HtmlHead()
4546 EmbedCssFile ( HtmlReportResources . classic_css_min ) ;
4647 EmbedCssFile ( _model . CustomStylesheet , HtmlReportResources . CustomStylesheetComment ) ;
4748
48- AddLine ( string . Format ( "<title>BDDfy Test Result {0}</title>" , _model . RunDate . ToShortDateString ( ) ) ) ;
49+ AddLine ( string . Format ( "<title>BDDfy Test Result {0}</title>" , _model . RunDate . ToString ( CultureInfo . CurrentCulture . DateTimeFormat . ShortDatePattern ) ) ) ;
4950 }
5051 }
5152
Original file line number Diff line number Diff line change 1- using System . Web . Script . Serialization ;
2-
31namespace TestStack . BDDfy . Reporters . Serializers
42{
3+ #if NET40
4+ using System . Web . Script . Serialization ;
5+
56 public class JsonSerializer : ISerializer
67 {
78 public string Serialize ( object obj )
@@ -12,4 +13,23 @@ public string Serialize(object obj)
1213 return new JsonFormatter ( json ) . Format ( ) ;
1314 }
1415 }
16+
17+ #else
18+ using Newtonsoft . Json ;
19+
20+ public class JsonSerializer : ISerializer
21+ {
22+ public string Serialize ( object obj )
23+ {
24+ return JsonConvert . SerializeObject ( obj , Formatting . Indented ,
25+ new JsonSerializerSettings
26+ {
27+ NullValueHandling = NullValueHandling . Ignore ,
28+ ReferenceLoopHandling = ReferenceLoopHandling . Ignore
29+ } ) ;
30+ }
31+ }
32+
33+ #endif
34+
1535}
Original file line number Diff line number Diff line change 11{
2- "version" : " 1.0.0-*" ,
3- "packOptions" : {
4- },
2+ "version" : " 1.0.0-*" ,
3+ "packOptions" : {
4+ },
55
6- "dependencies" : {
6+ "dependencies" : {
77
8- },
8+ },
99
10- "frameworks" : {
11- "net40" : {
12- "dependencies" : {
10+ "frameworks" : {
11+ "net40" : {
12+ "dependencies" : {
1313
14- },
15- "frameworkAssemblies" : {
16- "System.Web" : " 4.0.0.0" ,
17- "System.Web.Extensions" : " 4.0.0.0"
18- }
19- },
20- "netstandard1.5" : {
21- "imports" : " dnxcore50" ,
22- "dependencies" : {
23- "NETStandard.Library" : " 1.5.0-rc2-24027" ,
24- "System.Linq.Expressions " : " 4 .0.11-rc2-24027 " ,
25- "System.Runtime.Extensions " : " 4.1.0 -rc2-24027"
26- }
27- }
14+ },
15+ "frameworkAssemblies" : {
16+ "System.Web" : " 4.0.0.0" ,
17+ "System.Web.Extensions" : " 4.0.0.0"
18+ }
19+ },
20+ "netstandard1.5" : {
21+ "imports" : " dnxcore50" ,
22+ "dependencies" : {
23+ "NETStandard.Library" : " 1.5.0-rc2-24027" ,
24+ "Newtonsoft.Json " : " 9 .0.1-beta1 " ,
25+ "System.Linq.Expressions " : " 4.0.11 -rc2-24027" ,
26+ "System.Runtime.Extensions" : " 4.1.0-rc2-24027 "
27+ }
2828 }
29+ }
2930}
You can’t perform that action at this time.
0 commit comments