Exemplo n.º 1
0
        public void LoadStatisticsTest()
        {
            ICCNetProjectStatisticsPlugIn plugIn = new CCNetProjectStatisticsPlugIn();
            ProjectStatsData data = plugIn.FetchStatistics();

            Assert.AreEqual(data.Builds.Count, 844);
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        public void IncorrectXmlRootElementTest()
        {
            string xml = "<statisticss><statistic></statistic></statisticss>";

            byte[] bytes = Encoding.ASCII.GetBytes(xml);
            using (MemoryStream stream = new MemoryStream(bytes))
            {
                CCNetProjectStatisticsPlugIn.Load(stream);
            }
        }
Exemplo n.º 4
0
        private ProjectStatsData GetStatisticDataFromFile()
        {
            ProjectStatsData data;

            using (Stream stream = File.OpenRead(@"..\..\..\Data\Samples\ccnet.stats.xml"))
            {
                data = CCNetProjectStatisticsPlugIn.Load(stream);
            }

            return(data);
        }