Ejemplo n.º 1
0
        public void TestScheduleTalksWithTalksToTestBufferAllocation()
        {
            List <ITalk> talks      = GetTalks(TestData.TalksToTestBufferAllocation);
            IConference  conference = Factory.Instance.GetNewConference(talks);

            conference.ScheduleTalks();
            Assert.True(conference.UnscheduledTalks.Count == 0);
        }
Ejemplo n.º 2
0
        public void TestScheduleTalksWithBalanceTalks()
        {
            List <ITalk> talks      = GetTalks(TestData.TalksWithBalanceTalks);
            IConference  conference = Factory.Instance.GetNewConference(talks);

            conference.ScheduleTalks();
            Assert.True(conference.UnscheduledTalks.Count == 4);
        }
Ejemplo n.º 3
0
        public void TestScheduleTalksFailure()
        {
            List <ITalk> talks      = GetTalks(TestData.TalksWithInvalidSum);
            IConference  conference = Factory.Instance.GetNewConference(talks);

            conference.ScheduleTalks();
            //UnscheduledTalks will be empty after all the talks are scheduled.
            Assert.True(conference.UnscheduledTalks.Count == 4);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Prints the output.
        /// </summary>
        /// <param name="testData">The test data.</param>
        private static void PrintOutput(List <string> testData)
        {
            Console.WriteLine(Resource.OutputTitle + Environment.NewLine);
            var         talks      = InputParser.Instance.GetTalks(testData);
            IConference conference = Factory.Instance.GetNewConference(talks, DateTime.Today);

            conference.ScheduleTalks();
            Console.WriteLine();
            Console.Write(conference.ToString());
        }