예제 #1
0
        public void Sprint_Fetch_Info_List()
        {
            SprintTestHelper.SprintAdd();
            SprintTestHelper.SprintAdd();

            var sprints = SprintRepository.SprintFetchInfoList(new SprintDataCriteria());

            Assert.IsTrue(sprints.Count() > 1, "Row returned should be greater than one");
        }
예제 #2
0
        public void Sprint_Fetch()
        {
            var sprint = SprintTestHelper.SprintNew();

            sprint = SprintRepository.SprintSave(sprint);

            sprint = SprintRepository.SprintFetch(sprint.SprintId);

            Assert.IsTrue(sprint != null, "Row returned should not equal null");
        }
예제 #3
0
        public void Sprint_Add()
        {
            var sprint = SprintTestHelper.SprintNew();

            Assert.IsTrue(sprint.IsValid, "IsValid should be true");

            sprint = SprintRepository.SprintSave(sprint);

            Assert.IsTrue(sprint.SprintId != 0, "SprintId should be a non-zero value");

            SprintRepository.SprintFetch(sprint.SprintId);
        }
예제 #4
0
        public void Sprint_Edit()
        {
            var sprint = SprintTestHelper.SprintNew();

            var name = sprint.Name;

            Assert.IsTrue(sprint.IsValid, "IsValid should be true");

            sprint = SprintRepository.SprintSave(sprint);

            sprint = SprintRepository.SprintFetch(sprint.SprintId);

            sprint.Name = DataHelper.RandomString(20);

            sprint = SprintRepository.SprintSave(sprint);

            sprint = SprintRepository.SprintFetch(sprint.SprintId);

            Assert.IsTrue(sprint.Name != name, "Name should have different value");
        }
예제 #5
0
        public void Sprint_Delete()
        {
            var sprint = SprintTestHelper.SprintNew();

            Assert.IsTrue(sprint.IsValid, "IsValid should be true");

            sprint = SprintRepository.SprintSave(sprint);

            sprint = SprintRepository.SprintFetch(sprint.SprintId);

            SprintRepository.SprintDelete(sprint.SprintId);

            try
            {
                SprintRepository.SprintFetch(sprint.SprintId);
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex.GetBaseException() is InvalidOperationException);
            }
        }