public string Description()
 {               
     DefaultBuildNameFormatter BuildNameFormatter;
     BuildNameFormatter = new DefaultBuildNameFormatter();
     return BuildNameFormatter.GetPrettyBuildName(mybuildSpecifier);
 }
		public void ShouldGetCorrectCssLinkForSelectedFailedBuild()
		{
			string className = new DefaultBuildNameFormatter().GetCssClassForSelectedBuildLink(CreateBuildSpecifier("log20020507042535.xml"));
			Assert.AreEqual("selected build-failed-link", className);
		}
		public void ShouldGetCorrectCssLinkForSelectedPassedBuild()
		{
			string className = new DefaultBuildNameFormatter().GetCssClassForSelectedBuildLink(CreateBuildSpecifier("log20020830164057Lbuild.6.xml"));
			Assert.AreEqual("selected build-passed-link", className);
		}
		public void ShouldFormatFailedBuildCorrectly()
		{
			string formattedBuildName = new DefaultBuildNameFormatter().GetPrettyBuildName(CreateBuildSpecifier("log20020507042535.xml"), CultureInfo.InvariantCulture);
			Assert.AreEqual("2002-05-07 04:25:35 (Failed)", formattedBuildName);
		}
		public void ShouldFormatPassedBuildCorrectly()
		{
			string formattedBuildName = new DefaultBuildNameFormatter().GetPrettyBuildName(CreateBuildSpecifier("log20020830164057Lbuild.6.xml"), CultureInfo.InvariantCulture);
			Assert.AreEqual("2002-08-30 16:40:57 (6)", formattedBuildName);
		}
                GetBuildGraph(int amountOfBuilds, Boolean buildsAreInSameDay)
        {        
            CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultBuildSpecifier[] builds;
            CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultProjectSpecifier ProjectSpecifier;
            CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultServerSpecifier ServerSpecifier;
            CruiseControl.WebDashboard.Dashboard.DefaultLinkFactory LinkFactory;
            CruiseControl.WebDashboard.Dashboard.DefaultBuildNameFormatter BuildNameFormatter;
            CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultUrlBuilder UrlBuilder;
            CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultCruiseUrlBuilder CruiseUrlBuilder;
            CruiseControl.Core.Project project;

            project = new CruiseControl.Core.Project();
            project.Name = "TestProject";

            ServerSpecifier = new CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultServerSpecifier("local");

            ProjectSpecifier = new CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultProjectSpecifier(ServerSpecifier,project.Name);
            
            builds = new CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultBuildSpecifier[amountOfBuilds];

            for(int i=0; i < amountOfBuilds; i++)
            {
                if (buildsAreInSameDay)                
                    builds[i] = new CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultBuildSpecifier( ProjectSpecifier , string.Format(System.Globalization.CultureInfo.CurrentCulture,"log20050801015223Lbuild.0.0.0.{0}.xml", i) );
                  else
                    builds[i] = new CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultBuildSpecifier( ProjectSpecifier , string.Format(System.Globalization.CultureInfo.CurrentCulture,"log200508{0}015223Lbuild.0.0.0.{1}.xml", (i+1).ToString("00"), i) );
            }

            UrlBuilder = new CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultUrlBuilder();
            CruiseUrlBuilder = new CruiseControl.Core.Reporting.Dashboard.Navigation.DefaultCruiseUrlBuilder(UrlBuilder);
            BuildNameFormatter = new CruiseControl.WebDashboard.Dashboard.DefaultBuildNameFormatter();
            
            LinkFactory = new  CruiseControl.WebDashboard.Dashboard.DefaultLinkFactory(UrlBuilder,CruiseUrlBuilder,BuildNameFormatter);
        
            return new CruiseControl.WebDashboard.Plugins.Statistics.BuildGraph(builds, LinkFactory, new Translations("en-US"));
        }