Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions TestStack.ConventionTests/Reporting/TypeDataFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace TestStack.ConventionTests.Reporting
{
using System;
using TestStack.ConventionTests.ConventionData;

public class TypeDataFormatter : IReportDataFormatter
{
Expand All @@ -11,16 +12,15 @@ public bool CanFormat(object data)

public string FormatString(object data)
{
return ((Type)data).FullName;
return ((Type)data).ToTypeNameString();
}

public string FormatHtml(object data)
{
var type = ((Type)data);
var ns = type.Namespace;
if (ns == null)
return type.Name;
return string.Format("{0}.<strong>{1}</strong>", ns, type.Name);
var oldValue = string.Format("{0}.", type.Namespace);
var newValue = string.Format("{0}.<strong>", type.Namespace);
return string.Format("{0}</strong>", FormatString(data).Replace(oldValue, newValue));
}
}
}