Beispiel #1
0
        private void AddTypedArticleSingleStartDateRangeParam(DnaTestURLRequestParams postParams, string startDate, int timeInterval)
        {
            postParams.Add("startdate", startDate);

            if (timeInterval > 0)
            {
                postParams.Add("timeinterval", timeInterval.ToString());
            }
        }
Beispiel #2
0
        private void AddTypedArticleSingleStartDateRangeParam(DnaTestURLRequestParams postParams, int startDay, int startMonth, int startYear, int timeInterval)
        {
            postParams.Add("startday", startDay.ToString());
            postParams.Add("startmonth", startMonth.ToString());
            postParams.Add("startyear", startYear.ToString());

            if (timeInterval > 0)
            {
                postParams.Add("timeinterval", timeInterval.ToString());
            }
        }
Beispiel #3
0
 private void AddTypedArticleCreateParams(DnaTestURLRequestParams postParams, string title, bool cancelled)
 {
     AddTypedArticleBaseParams(postParams, title);
     if (cancelled)
     {
         postParams.Add("acreatecancelled", "1");
     }
     else
     {
         postParams.Add("acreate", "1");
     }
 }
Beispiel #4
0
 private void AddTypedArticleUpdateParams(DnaTestURLRequestParams postParams, int entryId, string title, bool cancelled)
 {
     AddTypedArticleBaseParams(postParams, title);
     if (cancelled)
     {
         postParams.Add("aupdatecancelled", "1");
     }
     else
     {
         postParams.Add("aupdate", "1");
     }
     postParams.Add("h2g2id", GenerateH2G2Id(entryId).ToString());
 }
Beispiel #5
0
 private void AddTypedArticleBaseParams(DnaTestURLRequestParams postParams, string title)
 {
     postParams.Add("_msxml", "<MULTI-INPUT>" +
                             "    <REQUIRED NAME='TYPE'><VALIDATE TYPE='EMPTY'/></REQUIRED>" +
                             "    <REQUIRED NAME='BODY'><VALIDATE TYPE='EMPTY'/></REQUIRED>" +
                             "    <REQUIRED NAME='TITLE'><VALIDATE TYPE='EMPTY'/></REQUIRED>" +
                             "    <ELEMENT NAME='ROLE'></ELEMENT>" +
                             "    <REQUIRED NAME='WHOCANEDIT'><VALIDATE TYPE='EMPTY'/></REQUIRED>" +
                             "    <ELEMENT NAME='POLLTYPE1'></ELEMENT>" +
                             "    <ELEMENT NAME='POLLTYPE2'></ELEMENT>" +
                             "</MULTI-INPUT>");
     postParams.Add("type", "2");
     postParams.Add("_msfinish", "yes");
     postParams.Add("_msstage", "1");
     postParams.Add("title", title);
     postParams.Add("role", "testrole");
     postParams.Add("body", "Test body text");
     postParams.Add("whocanedit", "me");
 }