From a9bc184d66a9ff5798cd8910dc0565aa485534e4 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Tue, 1 Oct 2013 19:10:56 +0100 Subject: [PATCH] Fixes issue #47 --- .../Reporting/TypeDataFormatter.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TestStack.ConventionTests/Reporting/TypeDataFormatter.cs b/TestStack.ConventionTests/Reporting/TypeDataFormatter.cs index 49a3c76..a0561a3 100644 --- a/TestStack.ConventionTests/Reporting/TypeDataFormatter.cs +++ b/TestStack.ConventionTests/Reporting/TypeDataFormatter.cs @@ -1,6 +1,7 @@ namespace TestStack.ConventionTests.Reporting { using System; + using TestStack.ConventionTests.ConventionData; public class TypeDataFormatter : IReportDataFormatter { @@ -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}.{1}", ns, type.Name); + var oldValue = string.Format("{0}.", type.Namespace); + var newValue = string.Format("{0}.", type.Namespace); + return string.Format("{0}", FormatString(data).Replace(oldValue, newValue)); } } } \ No newline at end of file