/* Developer: Tyler Allen Date Created: 08/24/2016 --------------------------------------------------- */ using CPE.App.Notify.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using Shouldly; namespace CPE.App.NotifyConsole.Test { [TestClass] public class ProcessEndOfMeetingSessionAdobeConnectResultsForParticipantTest { /* Private test variables These are database specific because it's easier and probably more efective than to replicate service requests */ private const int _brokenKey = 0; private const int _meetingSessionKey = 3003; #region Participant Tracking Results [TestMethod] public void participant_tracking_results_found() { var meetingParticipantSessions = SessionHelper.getMeetingParticipantSessions(_meetingSessionKey); meetingParticipantSessions.ShouldNotBeNull(); meetingParticipantSessions.Count.ShouldBeGreaterThan(0); foreach (var meetingParticipantSession in meetingParticipantSessions) { var participantTrackings = SessionHelper.getParticipantTrackingResults(meetingParticipantSession.MeetingParticipantSessionKey); participantTrackings.ShouldNotBeNull(); participantTrackings.Count.ShouldBeGreaterThan(0); } } [TestMethod] public void participant_tracking_results_not_found() { var participantTrackings = SessionHelper.getParticipantTrackingResults(_brokenKey); participantTrackings.ShouldNotBeNull(); participantTrackings.Count.ShouldBe(0); } #endregion #region Participant Session Data Result [TestMethod] public void participant_session_data_result_found() { var meetingParticipantSessions = SessionHelper.getMeetingParticipantSessions(_meetingSessionKey); meetingParticipantSessions.ShouldNotBeNull(); meetingParticipantSessions.Count.ShouldBeGreaterThan(0); foreach (var meetingParticipantSession in meetingParticipantSessions) { var participantSessionDataResult = SessionHelper.getParticipantSessionsDataResult(_meetingSessionKey, meetingParticipantSession.MeetingParticipantSessionKey); participantSessionDataResult.ShouldNotBeNull(); } } [TestMethod] public void participant_session_data_result_not_found() { var participantSessionDataResult = SessionHelper.getParticipantSessionsDataResult(_brokenKey, _brokenKey); participantSessionDataResult.ShouldBeNull(); } #endregion } }