コード例 #1
0
        public void AddIteration_passingInProjectDetails_IterationCountGoesUpByOne()
        {
            // arrange
            ProjectDetail           projectDetail = this.CreateProjectDetail();
            List <ProjectIteration> initialList;
            List <ProjectIteration> finalList;
            IIterationManager       manager = IterationManagerFactory.GetManager(projectDetail);

            initialList = manager.ListIterations();
            string   newIterationName = "Iteration " + GetRandomGuid();
            DateTime?startDate        = DateTime.Now;
            DateTime?endDate          = DateTime.Now.AddDays(10);

            // act
            manager.AddNewIteration(newIterationName, startDate, endDate);

            // assert
            finalList = manager.ListIterations();

            int expected = initialList.Count + 1;
            int actual   = finalList.Count;

            Assert.AreEqual(expected, actual);

            manager.Dispose();
        }
コード例 #2
0
        public void Ctor_disposeOfObject_NoErrorThrown()
        {
            // arrange
            ProjectDetail projectDetail = this.CreateProjectDetail();

            // act
            using (IIterationManager manager = IterationManagerFactory.GetManager(projectDetail))
            {
                manager.Dispose();
            }

            // assert
            Assert.IsTrue(1 == 1);
        }