Exemple #1
0
 public void SetupTestSite()
 {
     _inputcontext = new FullInputContext("");
     _testSite = new Site(1, "h2g2", 0, false, "brunel", true, "H2G2", "h2g2",
                 "*****@*****.**", "*****@*****.**", "*****@*****.**", 1090497224, false, true, true, "", "Alert", 2000, 1090497224, 0,
                 1, 1, false, false, 16, 255, 1, "h2g2", false, "brunel", "", "");
 }
Exemple #2
0
        public void ModerationStatus_AsPreMod_ReturnsCorrectEnum()
        {
            int id = 5;
            string name = string.Empty;
            int threadOrder = 0;
            bool preModeration = true;
            string defaultSkin = string.Empty;
            bool noAutoSwitch = false;
            string description = string.Empty;
            string shortName = string.Empty;
            string moderatorsEmail = "moderatorsEmail";
            string editorsEmail = "editorsEmail";
            string feedbackEmail = "feedbackEmail";
            int autoMessageUserID = 0;
            bool passworded = false;
            bool unmoderated = false;
            bool articleGuestBookForums = false;
            string config = string.Empty;
            string emailAlertSubject = string.Empty;
            int threadEditTimeLimit = 0;
            int eventAlertMessageUserID = 0;
            int allowRemoveVote = 0;
            int includeCrumbtrail = 0;
            int allowPostCodesInSearch = 0;
            bool queuePostings = false;
            bool emergencyClosed = false;
            int minAge = 0;
            int maxAge = 0;
            int modClassID = 0;
            string ssoService = string.Empty;
            bool useIdentitySignInSystem = false;
            string skinSet = string.Empty;
            string IdentityPolicy = string.Empty;
            string ContactFormsEmail = string.Empty;
            
            string connection = string.Empty;
            var target = new Site(id, name, threadOrder, preModeration, defaultSkin, noAutoSwitch, description,
                                  shortName, moderatorsEmail, editorsEmail, feedbackEmail, autoMessageUserID, passworded,
                                  unmoderated, articleGuestBookForums, config, emailAlertSubject, threadEditTimeLimit,
                                  eventAlertMessageUserID, allowRemoveVote, includeCrumbtrail, allowPostCodesInSearch,
                                  queuePostings, emergencyClosed, minAge, maxAge, modClassID, ssoService,
                                  useIdentitySignInSystem, skinSet, IdentityPolicy, ContactFormsEmail);
            Assert.AreEqual(id, target.SiteID);


            Assert.AreEqual(ModerationStatus.SiteStatus.PreMod, target.ModerationStatus);
        }
Exemple #3
0
 /// <summary>
 /// Given a type of email to return return the correct email for the site
 /// </summary>
 /// <param name="emailType">Type of email required</param>
 /// <returns>The selected email for that type requested</returns>
 public virtual string GetEmail(Site.EmailType emailType)
 {
     throw new Exception("The method or operation is not implemented.");
 }