initial commit
[CPE_learningsite] / CPE / CPE.App / CPE.App.Notify.Test / ProcessEndOfMeetingSessionAdobeConnectResultsForParticipantTest.cs
1 /*
2 Developer: Tyler Allen
3 Date Created: 08/24/2016
4 ---------------------------------------------------
5 */
6
7 using CPE.App.Notify.Helpers;
8 using Microsoft.VisualStudio.TestTools.UnitTesting;
9 using Shouldly;
10
11 namespace CPE.App.NotifyConsole.Test {
12     [TestClass]
13     public class ProcessEndOfMeetingSessionAdobeConnectResultsForParticipantTest {
14         /* 
15             Private test variables
16
17             These are database specific because it's easier and
18             probably more efective than to replicate service requests
19         */
20         private const int _brokenKey = 0;
21         private const int _meetingSessionKey = 3003;
22
23         #region Participant Tracking Results
24
25         [TestMethod]
26         public void participant_tracking_results_found() {
27             var meetingParticipantSessions = SessionHelper.getMeetingParticipantSessions(_meetingSessionKey);
28             meetingParticipantSessions.ShouldNotBeNull();
29             meetingParticipantSessions.Count.ShouldBeGreaterThan(0);
30
31             foreach (var meetingParticipantSession in meetingParticipantSessions) {
32                 var participantTrackings = SessionHelper.getParticipantTrackingResults(meetingParticipantSession.MeetingParticipantSessionKey);
33                 participantTrackings.ShouldNotBeNull();
34                 participantTrackings.Count.ShouldBeGreaterThan(0);
35             }
36         }
37
38         [TestMethod]
39         public void participant_tracking_results_not_found() {
40             var participantTrackings = SessionHelper.getParticipantTrackingResults(_brokenKey);
41             participantTrackings.ShouldNotBeNull();
42             participantTrackings.Count.ShouldBe(0);
43         }
44
45         #endregion
46
47         #region Participant Session Data Result
48
49         [TestMethod]
50         public void participant_session_data_result_found() {
51             var meetingParticipantSessions = SessionHelper.getMeetingParticipantSessions(_meetingSessionKey);
52             meetingParticipantSessions.ShouldNotBeNull();
53             meetingParticipantSessions.Count.ShouldBeGreaterThan(0);
54
55             foreach (var meetingParticipantSession in meetingParticipantSessions) {
56                 var participantSessionDataResult = SessionHelper.getParticipantSessionsDataResult(_meetingSessionKey, meetingParticipantSession.MeetingParticipantSessionKey);
57                 participantSessionDataResult.ShouldNotBeNull();
58             }
59         }
60
61         [TestMethod]
62         public void participant_session_data_result_not_found() {
63             var participantSessionDataResult = SessionHelper.getParticipantSessionsDataResult(_brokenKey, _brokenKey);
64             participantSessionDataResult.ShouldBeNull();
65         }
66
67         #endregion
68     }
69 }