public void DeleteComment_Deleted_NotFail_Test()
        {
            bool called = false;
            var expectedcomment = new Comment() { CommentId = 1, SessionId = 10 };
            int organizerId = 10;

            ISessionRepository sessionRepository = new StubISessionRepository();
            ICommentRepository commentRepository = new StubICommentRepository()
            {
                DeleteInt32 = commentId =>
                {
                    Assert.AreEqual(expectedcomment.CommentId, commentId);
                    called = true;
                },
                GetOrganizerIdInt32 = commentId =>
                {
                    return organizerId;
                }
            };

            using (ShimsContext.Create())
            {
                MyEvents.Api.Authentication.Fakes.ShimMyEventsToken myeventToken = new Authentication.Fakes.ShimMyEventsToken();
                myeventToken.RegisteredUserIdGet = () => { return organizerId; };
                ShimMyEventsToken.GetTokenFromHeader = () => { return myeventToken; };

                var target = new CommentsController(commentRepository, sessionRepository);

                target.Delete(expectedcomment.CommentId);

                Assert.IsTrue(called);
            }
        }
        public void DeleteComment_UnauthorizedException_Test()
        {
            var expectedcomment = new Comment() { CommentId = 1, SessionId = 10 };
            int organizerId = 10;

            ISessionRepository sessionRepository = new StubISessionRepository()
            {
                GetOrganizerIdInt32 = (sessionId) =>
                {
                    return organizerId;
                }
            };

            ICommentRepository commentRepository = new StubICommentRepository()
            {
                GetInt32 = commentId =>
                {
                    return expectedcomment;
                }
            };

            using (ShimsContext.Create())
            {
                MyEvents.Api.Authentication.Fakes.ShimMyEventsToken myeventToken = new Authentication.Fakes.ShimMyEventsToken();
                myeventToken.RegisteredUserIdGet = () => { return 1000; };
                ShimMyEventsToken.GetTokenFromHeader = () => { return myeventToken; };

                var target = new CommentsController(commentRepository, sessionRepository);

                target.Delete(expectedcomment.CommentId);
            }
        }