public static QSimple GetFreshQSimple(Page page) { var qSimple = new QSimple(1, GetFreshBaseYesNoAbsPoint(page)); qSimple.IsQuestionAboutPrivilegeDividends = false; return(qSimple); }
public void TestFixtureSetUp() { #region doesnt matter constants const bool doesntmatter = true; var doesntmatter2 = FractionLong.Zero; #endregion _invalidQSimple1 = new QSimple(1, new BaseYesNoAbsPoint( Fields.CheckBoxDocField(doesntmatter, ErrorLevel.Error), Fields.CheckBoxDocField(doesntmatter, ErrorLevel.Error), Fields.CheckBoxDocField(doesntmatter, ErrorLevel.Valid), Fields.VotesDocField(doesntmatter2), Fields.VotesDocField(doesntmatter2), Fields.VotesDocField(doesntmatter2) )); _validQSimple = new QSimple(2, new BaseYesNoAbsPoint( Fields.CheckBoxDocField(doesntmatter, ErrorLevel.WasntChecked), Fields.CheckBoxDocField(doesntmatter, ErrorLevel.Valid), Fields.CheckBoxDocField(doesntmatter, ErrorLevel.Valid), Fields.VotesDocField(doesntmatter2, ErrorLevel.WasntChecked), Fields.VotesDocField(doesntmatter2, ErrorLevel.Valid), Fields.VotesDocField(doesntmatter2, ErrorLevel.WasntChecked) )); _invalidQSimple2 = new QSimple(3, new BaseYesNoAbsPoint( Fields.CheckBoxDocField(doesntmatter, ErrorLevel.Valid), Fields.CheckBoxDocField(doesntmatter, ErrorLevel.WasntChecked), Fields.CheckBoxDocField(doesntmatter, ErrorLevel.Valid), Fields.VotesDocField(doesntmatter2, ErrorLevel.Error), Fields.VotesDocField(doesntmatter2, ErrorLevel.WasntChecked), Fields.VotesDocField(doesntmatter2, ErrorLevel.WasntChecked) )); var bulletin = TestBulletinModel.Create(new List <Question> { _invalidQSimple1, _validQSimple, _invalidQSimple2, }); var checker = new QuestionValidityChecker(new CandidateValidityChecker(), new AdrQuestionValidityChecker()); _invalidQuestions = checker.GetInvalidQuestions(bulletin); }
private static void SetVoteFieldsThatDontHaveCorrespondingChecksSetAsWasntChecked(QSimple question) { SetVoteFieldsThatDontHaveCorrespondingChecksSetAsWasntChecked(question.Point); }
public QSimplePrivilegeDividendsNoAbsWarningRule(QSimple qSimple, bool packHasPrivilegeVotes) { _packHasPrivilegeVotes = packHasPrivilegeVotes; Question = qSimple; }