/// <summary>
        /// Adds the track.
        /// </summary>
        /// <param name="track">The track.</param>
        public static void AddTrack(Track track)
        {
            if (track == null)
            {
                throw new ArgumentNullException("track", "The track cannot be null.");
            }

            _tracks = GetListOfTracks();
            _tracks.Add(track);
        }
 public void Addition_of_track(bool isNull)
 {
     if (isNull)
     {
         Track nullTrack = null;
         ConferenceManager.AddTrack(nullTrack);
     }
     else
     {
         int numberOfExistingTracks = ConferenceManager.Tracks.Count;
         Track newTrack = new Track();
         ConferenceManager.AddTrack(newTrack);
         ConferenceManager.Tracks.Count.Should().Be(numberOfExistingTracks + 1);
     }
 }
        /// <summary>
        /// Adds the talk to a session.
        /// </summary>
        /// <param name="aTrack">A track.</param>
        /// <param name="talk">The talk.</param>
        /// <param name="talkHasBeenAdded">if set to <c>true</c> [talk has been added].</param>
        /// <returns>Track.</returns>
        private static Track AddTalkToSession(Track aTrack, Talk talk, out bool talkHasBeenAdded)
        {
            // The given talk has not been added yet
            talkHasBeenAdded = false;

            // Check and add the talk to the session in the track
            foreach (Session aSession in aTrack.Sessions)
            {
                // Whether the session can accommodate the talk
                if (aSession.CanAccommodateThis(talk))
                {
                    // Add the talk into the session
                    aSession.AddTalk(talk);
                    talkHasBeenAdded = true;
                    break;
                }
            }

            return aTrack;
        }
示例#4
0
 public void TestStartUp()
 {
     this.track = new Track();
 }