public void Then_MultilineTextBox_Should_be_Published()
        {
            //Arrange


            ISurveyInfoDao objISurveryInfoDao = new EntitySurveyInfoDao();
            SurveyInfo     objSurveyInfo      = new SurveyInfo(objISurveryInfoDao);

            Publisher objPublisher = new Publisher(objISurveryInfoDao);

            SurveyDataProvider DataObj = new SurveyDataProvider();//Get Data

            SurveyRequestBO       objSurveyRequestBO;
            SurveyRequestResultBO objSurveyResponseBO;
            SurveyInfoBO          objSurveyInfoBO = new SurveyInfoBO();
            string TemplateXML;
            string surveyURL;
            string surveyID = string.Empty;


            //Act

            objSurveyRequestBO  = DataObj.CreateSurveyRequestBOObject();
            TemplateXML         = objSurveyRequestBO.TemplateXML;
            objSurveyInfoBO     = DataObj.CreateSurveyInfoBOObject();
            objSurveyResponseBO = objPublisher.PublishSurvey(objSurveyInfoBO);         //Publish Survey Takes SurveyInfoBO
            surveyURL           = objSurveyResponseBO.URL;
            surveyID            = surveyURL.Substring(surveyURL.LastIndexOf('/') + 1); //Get the ID from Url.
            objSurveyInfoBO     = objSurveyInfo.GetSurveyInfoById(surveyID);


            //Assert
            Assert.NotNull(objSurveyInfoBO.XML);
            Assert.NotNull(TemplateXML);
        }
Beispiel #2
0
        public void Then_Multiple_Response_Value_Recorded()
        {
            //Arrange


            ISurveyInfoDao objISurveryInfoDao = new EntitySurveyInfoDao();
            SurveyInfo     objSurveyInfo      = new SurveyInfo(objISurveryInfoDao);

            Publisher objPublisher = new Publisher(objISurveryInfoDao);

            SurveyDataProvider DataObj = new SurveyDataProvider();//Get Data

            SurveyRequestBO       objSurveyRequestBO;
            SurveyRequestResultBO objSurveyResponseBO;
            SurveyInfoBO          objSurveyInfoBO = new SurveyInfoBO();
            int    ResonseType;
            string surveyURL;
            string surveyID = string.Empty;

            //Act

            objSurveyRequestBO            = DataObj.CreateSurveyRequestBOObject();
            objSurveyRequestBO.SurveyType = 2;

            ResonseType     = objSurveyRequestBO.SurveyType;
            objSurveyInfoBO = DataObj.CreateSurveyInfoBOObject();
            // objSurveyResponseBO = objPublisher.PublishSurvey(objSurveyRequestBO);// publish survey and get Response back
            objSurveyResponseBO = objPublisher.PublishSurvey(objSurveyInfoBO);

            surveyURL = objSurveyResponseBO.URL;
            surveyID  = surveyURL.Substring(surveyURL.LastIndexOf('/') + 1); //Get the ID from Url.


            objSurveyInfoBO = objSurveyInfo.GetSurveyInfoById(surveyID);


            //Assert

            Assert.AreEqual(objSurveyInfoBO.SurveyType, ResonseType);
        }
Beispiel #3
0
        public void Then_ClosingDate_Recorded()
        {
            //Arrange
            ISurveyInfoDao objISurveryInfoDao = new EntitySurveyInfoDao();
            SurveyInfo     objSurveyInfo      = new SurveyInfo(objISurveryInfoDao);

            Publisher objPublisher = new Publisher(objISurveryInfoDao);

            SurveyDataProvider DataObj = new SurveyDataProvider();//Get Data

            SurveyRequestBO       objSurveyRequestBO;
            SurveyRequestResultBO objSurveyResponseBO;
            SurveyInfoBO          objSurveyInfoBO = new SurveyInfoBO();
            DateTime closingDate;
            string   surveyURL;
            string   surveyID = string.Empty;

            //Act

            objSurveyRequestBO = DataObj.CreateSurveyRequestBOObject();
            closingDate        = objSurveyRequestBO.ClosingDate; //Closing date that is sent in


            //objSurveyResponseBO = objPublisher.PublishSurvey(objSurveyRequestBO);// publish survey and get Response back
            objSurveyInfoBO     = DataObj.CreateSurveyInfoBOObject();
            objSurveyResponseBO = objPublisher.PublishSurvey(objSurveyInfoBO);

            surveyURL = objSurveyResponseBO.URL;
            surveyID  = surveyURL.Substring(surveyURL.LastIndexOf('/') + 1); //Get the ID from Url.


            objSurveyInfoBO = objSurveyInfo.GetSurveyInfoById(surveyID);


            //Assert

            Assert.AreEqual(objSurveyInfoBO.ClosingDate, closingDate);
        }