コード例 #1
0
        public void GetAllEnabledQueuesTest()
        {
            TicketQueueCollection CreatedSet = new TicketQueueCollection();

            //Select everything in teh database.
            TicketQueueCollection PreSelectionSet = HelpdeskService.GetAllEnabledQueues();

            //Add the new items into the database and keep of collection of them for deletion later...
            for (int x = 0; x < 10; x++)
            {
                TicketQueue temp = NewQueue();

                HelpdeskService.CreateQueue(temp);
                CreatedSet.Add(temp);
            }

            //Get teh values of everything in teh datbase now that we have done some insertions.
            TicketQueueCollection PostSelectionSet = HelpdeskService.GetAllEnabledQueues();

            //Check their counts to make sure everything went into the database correctly.
            Assert.IsTrue((PreSelectionSet.Count + 10) == PostSelectionSet.Count);
        }