Example #1
0
        private ModifyPresidentialResultsCommand DefaultModifyPresidentialResultsCommand(int executionOrder, ResultRef result, PollingCentreRef pollingCentre, UserRef user)
        {
            var fixture = new Fixture();
            ModifyPresidentialResultsCommand cmd = fixture
                                                   .Build <ModifyPresidentialResultsCommand>()
                                                   .With(n => n.ApplyToResult, result)
                                                   .With(n => n.CommandGeneratedByUser, user)
                                                   .With(n => n.OriginatingPollingCentre, pollingCentre)
                                                   .Create();

            cmd.CommandId     = Guid.NewGuid();
            cmd.ApplyToResult = result;
            CandidateRef candidate = new CandidateRef(Guid.NewGuid(), "Pombe Magufuli", CandidateType.PartyBacked);
            var          res       = new ResultDetail {
                Candidate = candidate, Result = 1000
            };
            var resList = new List <ResultDetail>();

            resList.Add(res);
            cmd.ResultDetail             = resList;
            cmd.OriginatingPollingCentre = pollingCentre;
            cmd.CommandGeneratedByUser   = user;
            cmd.CommandExecutionOrder    = executionOrder;
            return(cmd);
        }
Example #2
0
        private AddWomenRepLineItemsCommand DefaultAddWomenRepLineItemsCommand(int executionOrder, ResultRef result, PollingCentreRef pollingCentre, UserRef user)
        {
            var fixture = new Fixture();
            AddWomenRepLineItemsCommand cmd = fixture
                                              .Build <AddWomenRepLineItemsCommand>()
                                              .With(n => n.ApplyToResult, result)
                                              .Create();

            cmd.CommandId     = Guid.NewGuid();
            cmd.ApplyToResult = result;
            CandidateRef candidate = new CandidateRef(Guid.NewGuid(), "Rachel Shebesh", CandidateType.PartyBacked);
            var          res       = new ResultDetail {
                Candidate = candidate, Result = 1000
            };
            var resList = new List <ResultDetail>();

            resList.Add(res);
            cmd.ResultDetail             = resList;
            cmd.OriginatingPollingCentre = pollingCentre;
            cmd.CommandGeneratedByUser   = user;
            cmd.CommandExecutionOrder    = executionOrder;
            return(cmd);
        }