public void LoadStatisticsTest() { ICCNetProjectStatisticsPlugIn plugIn = new CCNetProjectStatisticsPlugIn(); ProjectStatsData data = plugIn.FetchStatistics(); Assert.AreEqual(data.Builds.Count, 844); }
public void NotSupportedIntegrationElementTest() { string xml = "<statistics><integration><element></element></integration></statistics>"; byte[] bytes = Encoding.ASCII.GetBytes(xml); using (MemoryStream stream = new MemoryStream(bytes)) { CCNetProjectStatisticsPlugIn.Load(stream); } }
public void IncorrectXmlRootElementTest() { string xml = "<statisticss><statistic></statistic></statisticss>"; byte[] bytes = Encoding.ASCII.GetBytes(xml); using (MemoryStream stream = new MemoryStream(bytes)) { CCNetProjectStatisticsPlugIn.Load(stream); } }
private ProjectStatsData GetStatisticDataFromFile() { ProjectStatsData data; using (Stream stream = File.OpenRead(@"..\..\..\Data\Samples\ccnet.stats.xml")) { data = CCNetProjectStatisticsPlugIn.Load(stream); } return(data); }