File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
TestStack.ConventionTests/Reporting Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11namespace TestStack . ConventionTests . Reporting
22{
33 using System ;
4+ using TestStack . ConventionTests . ConventionData ;
45
56 public class TypeDataFormatter : IReportDataFormatter
67 {
@@ -11,16 +12,15 @@ public bool CanFormat(object data)
1112
1213 public string FormatString ( object data )
1314 {
14- return ( ( Type ) data ) . FullName ;
15+ return ( ( Type ) data ) . ToTypeNameString ( ) ;
1516 }
1617
1718 public string FormatHtml ( object data )
1819 {
1920 var type = ( ( Type ) data ) ;
20- var ns = type . Namespace ;
21- if ( ns == null )
22- return type . Name ;
23- return string . Format ( "{0}.<strong>{1}</strong>" , ns , type . Name ) ;
21+ var oldValue = string . Format ( "{0}." , type . Namespace ) ;
22+ var newValue = string . Format ( "{0}.<strong>" , type . Namespace ) ;
23+ return string . Format ( "{0}</strong>" , FormatString ( data ) . Replace ( oldValue , newValue ) ) ;
2424 }
2525 }
2626}
You can’t perform that action at this time.
0 commit comments