3 Date Created: 08/24/2016
4 ---------------------------------------------------
7 using CPE.App.Notify.Helpers;
8 using CPE.App.Notify.Models.Enums;
9 using Microsoft.VisualStudio.TestTools.UnitTesting;
12 namespace CPE.App.NotifyConsole.Test {
14 public class StopSessionTest {
16 Private test variables
18 These are database specific because it's easier and
19 probably more efective than to replicate service requests
21 private const int _brokenKey = 0;
22 private const int _meetingSessionKey = 10122;
23 private const long _workingMeetingRoomPrincipalId = 1056036046;
24 private const long _workingMeetingRoomScoId = 1196731724;
25 private const long _workingRecordingPrincipalId = 1196825657;
26 private const long _workingRecordingScoId = 1190521196;
28 #region Meeting Sessions
31 public void session_found() {
32 var meetingSession = SessionHelper.getMeetingSession(_meetingSessionKey);
33 meetingSession.ShouldNotBeNull();
37 public void session_not_found() {
38 var meetingSession = SessionHelper.getMeetingSession(_brokenKey);
39 meetingSession.ShouldBeNull();
44 #region Meeting Participant Sessions
47 public void meeting_participant_sessions_found() {
48 var meetingParticipantSessions = SessionHelper.getMeetingParticipantSessions(_meetingSessionKey);
49 meetingParticipantSessions.ShouldNotBeNull();
50 meetingParticipantSessions.Count.ShouldBeGreaterThan(0);
54 public void meeting_participant_sessions_not_found() {
55 var meetingParticipantSessions = SessionHelper.getMeetingParticipantSessions(_brokenKey);
56 meetingParticipantSessions.ShouldNotBeNull();
57 meetingParticipantSessions.Count.ShouldBe(0);
62 #region Participant Purchase
65 public void participant_purchase_participantkey_found() {
66 var participantPurchase = SessionHelper.getParticipantPurchase(_workingRecordingPrincipalId, _workingRecordingScoId);
67 participantPurchase.ShouldNotBeNull();
71 public void participant_purchase_participantkey_not_found() {
72 var participantPurchase = SessionHelper.getParticipantPurchase(_brokenKey, (long) _brokenKey);
73 participantPurchase.ShouldBeNull();
81 public void stop_session_working() {
82 var boolResult = SessionHelper.StopSession(_meetingSessionKey, true);
83 boolResult.ShouldBeTrue();