Esempio n. 1
0
        public void Close_out_date_is_properly_sent_At_Publish_time()
        {
            //Arrange
            Publisher          objPublisher = new Publisher();
            SurveyDataProvider DataObj      = new SurveyDataProvider();
            SurveyRequestBO    objSurveyRequestBO;

            //Act
            objSurveyRequestBO = DataObj.CreateSurveyRequestBOObject();
            //Assert

            Assert.IsNotNull(objSurveyRequestBO.ClosingDate);
        }
Esempio n. 2
0
        public void TemplateXML_properly_sent_At_Publish_time()
        {
            //Arrange
            Publisher          objPublisher = new Publisher();
            SurveyDataProvider DataObj      = new SurveyDataProvider();
            SurveyRequestBO    objSurveyRequestBO;

            //Act
            objSurveyRequestBO = DataObj.CreateSurveyRequestBOObject();
            //Assert

            Assert.IsNotNull(objSurveyRequestBO.TemplateXML);
        }
Esempio n. 3
0
        public void When_Single_Response_Survey_Provided_It_Is_Recorded()//Single and Multiple
        {
            //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;


            EntitySurveyInfoDao EntitySurveyInfoDao = new EntitySurveyInfoDao();

            //Act

            objSurveyRequestBO = DataObj.CreateSurveyRequestBOObject();
            //objSurveyInfoBO =objSurveyRequestBO;

            // objSurveyInfoBO =  EntitySurveyInfoDao.GetSurveyInfo(objSurveyRequestBO.SurveyNumber);


            ResonseType = objSurveyRequestBO.SurveyType;

            //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);
        }
Esempio n. 4
0
        public void When_CloseDate_Provided_It_Is_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
            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);
        }