Ejemplo n.º 1
0
        public void UpdateInterviewHandlerQuestion_EmptyOBjectId_Failure()
        {
            var res = InterviewQuestion.UpdateInterviewHandlerQuestion(_mockServer, "", 1, true, 1, "test");

            Assert.IsFalse(res.Success, "Calling UpdateInterviewHandlerQuestion with empty objectid did not fail");
        }
        public void InterviewQuestion_StaticFailureTest()
        {
            //GetInterviewHandlerQuestionRecording
            var res = InterviewQuestion.GetInterviewHandlerQuestionRecording(null, "c:\\test.wav", "objectid", 1);

            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewHandlerQuestionRecording(_connectionServer, "c:\\test.wav", "objectid", 1);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewHandlerQuestionRecording(_connectionServer, "", "objectid", 1);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewHandlerQuestionRecording(_connectionServer, "c:\\bogus\\bogus\\temp.wav", "objectid", 1);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewHandlerQuestionRecording(_connectionServer, "c:\\test.wav", "", 1);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewHandlerQuestionRecording(_connectionServer, "c:\\test.wav", _tempHandler.ObjectId, 999);
            Assert.IsFalse(res.Success, "");

            //GetInterviewQuestion
            InterviewQuestion oQuestion;

            res = InterviewQuestion.GetInterviewQuestion(out oQuestion, null, "objectid", 1);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewQuestion(out oQuestion, _connectionServer, "objectid", 1);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewQuestion(out oQuestion, _connectionServer, "", 1);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewQuestion(out oQuestion, _connectionServer, _tempHandler.ObjectId, 999);
            Assert.IsFalse(res.Success, "");

            //GetInterviewQuestions
            List <InterviewQuestion> oQuestions;

            res = InterviewQuestion.GetInterviewQuestions(null, "objectid", out oQuestions);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.GetInterviewQuestions(_connectionServer, "", out oQuestions);
            Assert.IsFalse(res.Success, "");


            //SetInterviewHandlerQuestionRecording
            res = InterviewQuestion.SetInterviewHandlerQuestionRecording(null, "c:\\temp.wav", "objectid", 1, true);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.SetInterviewHandlerQuestionRecording(_connectionServer, "bogus.wav", "objectid", 1, true);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.SetInterviewHandlerQuestionRecording(_connectionServer, "bogus.wav", "", 1, true);
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.SetInterviewHandlerQuestionRecording(_connectionServer, "Dummy.wav", _tempHandler.ObjectId, 999, true);
            Assert.IsFalse(res.Success, "");

            //SetInterviewHandlerQuestionRecordingToStreamFile
            res = InterviewQuestion.SetInterviewHandlerQuestionRecordingToStreamFile(null, "objectid", 1, "streamid");
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.SetInterviewHandlerQuestionRecordingToStreamFile(_connectionServer, "objectid", 1, "streamid");
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.SetInterviewHandlerQuestionRecordingToStreamFile(_connectionServer, "", 1, "streamid");
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.SetInterviewHandlerQuestionRecordingToStreamFile(_connectionServer, _tempHandler.ObjectId, 1, "");
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.SetInterviewHandlerQuestionRecordingToStreamFile(_connectionServer, _tempHandler.ObjectId, 999, "streamId");
            Assert.IsFalse(res.Success, "");

            //UpdateInterviewHandlerQuestion
            res = InterviewQuestion.UpdateInterviewHandlerQuestion(null, "objectid", 1, true, 1, "test");
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.UpdateInterviewHandlerQuestion(_connectionServer, "objectid", 1, true, 1, "test");
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.UpdateInterviewHandlerQuestion(_connectionServer, "", 1, true, 1, "test");
            Assert.IsFalse(res.Success, "");

            res = InterviewQuestion.UpdateInterviewHandlerQuestion(_connectionServer, _tempHandler.ObjectId, 999, true, 1, "test");
            Assert.IsFalse(res.Success, "");
        }
Ejemplo n.º 3
0
        public void UpdateInterviewHandlerQuestion_NullConnectionServer_Failure()
        {
            var res = InterviewQuestion.UpdateInterviewHandlerQuestion(null, "objectid", 1, true, 1, "test");

            Assert.IsFalse(res.Success, "Calling UpdateInterviewHandlerQuestion with did not fail");
        }