Beispiel #1
0
        public void Init()
        {
            _fakes = new AnalyzerFakes();
            Db     = _fakes.DbContext;
            Db.ForTests();
            UnityInstance.Offer(Db);

            _electionGuid = Guid.NewGuid();
            SessionKey.CurrentElectionGuid.SetInSession(_electionGuid);
            BallotTestHelper.SaveElectionGuidForTests(_electionGuid);

            SessionKey.CurrentComputer.SetInSession(new Computer
            {
                ComputerGuid = Guid.NewGuid(),
                ComputerCode = "TEST",
                ElectionGuid = _electionGuid
            });

            _samplePeople = new List <Person>
            {
                new Person {
                }.ForTests(),
                new Person {
                }.ForTests(),
                new Person {
                }.ForTests(),
                new Person {
                }.ForTests(),
                new Person {
                }.ForTests(),
            };
        }
        public void Init()
        {
            _fakes = new AnalyzerFakes();
            Db     = _fakes.DbContext;
            Db.ForTests();
            UnityInstance.Offer(Db);

            _electionGuid = Guid.NewGuid();

            SessionKey.CurrentElectionGuid.SetInSession(_electionGuid);
            BallotTestHelper.SaveElectionGuidForTests(_electionGuid);

            SessionKey.CurrentComputer.SetInSession(new Computer
            {
                ComputerGuid = Guid.NewGuid(),
                ComputerCode = "TEST",
                ElectionGuid = _electionGuid
            });

            SamplePeople = new List <Person>
            {
                new Person {
                    FirstName = "a0", CombinedInfo = "abc", CombinedInfoAtStart = "abc", VotingMethod = VotingMethodEnum.InPerson
                }.ForTests(),
                new Person {
                    FirstName = "a1",
                }.ForTests(),
                new Person {
                    FirstName = "a2",
                }.ForTests(),
                new Person {
                    FirstName = "a3",
                }.ForTests(),
                new Person {
                    FirstName = "a4",
                }.ForTests(),
                new Person {
                    FirstName = "a5", IneligibleReasonGuid = IneligibleReasonEnum.Ineligible_Moved_elsewhere_recently
                }.ForTests(),
                new Person {
                    FirstName = "a6", IneligibleReasonGuid = IneligibleReasonEnum.IneligiblePartial1_Older_Youth
                }.ForTests(),
                new Person {
                    FirstName = "a7", IneligibleReasonGuid = IneligibleReasonEnum.Ineligible_Resides_elsewhere
                }.ForTests(),
            };
        }
        public void Init()
        {
            _fakes = new AnalyzerFakes();
            Db     = _fakes.DbContext;
            Db.ForTests();
            UnityInstance.Offer(Db);

            _electionGuid = Guid.NewGuid();
            SessionKey.CurrentElectionGuid.SetInSession(_electionGuid);
            BallotTestHelper.SaveElectionGuidForTests(_electionGuid);

            SessionKey.CurrentComputer.SetInSession(new Computer
            {
                ComputerGuid = Guid.NewGuid(),
                ComputerCode = "TEST",
                ElectionGuid = _electionGuid
            });

            _samplePeople = new List <Person>
            {// 0 - 7
                new Person {
                    FirstName = "x0", CombinedInfo = "person", VotingMethod = VotingMethodEnum.InPerson
                }.ForTests(),
                new Person {
                    FirstName = "x1", CombinedInfo = "person"
                }.ForTests(),
                new Person {
                    FirstName = "x2", CombinedInfo = "person"
                }.ForTests(),
                new Person {
                    FirstName = "x3", CombinedInfo = "person"
                }.ForTests(),
                new Person {
                    FirstName = "x4", CombinedInfo = "person"
                }.ForTests(),
                new Person {
                    FirstName = "x5", CombinedInfo = "person"
                }.ForTests(),
                new Person {
                    FirstName = "x6", CombinedInfo = "person"
                }.ForTests(),
                new Person {
                    FirstName = "x7", CombinedInfo = "person"
                }.ForTests(),
            };
        }
    public void Init()
    {
      _fakes = new AnalyzerFakes();

      _persons = new List<Person>
        {
          new Person {VotingMethod = VotingMethodEnum.InPerson},
          new Person {},
          new Person {},
          new Person {},
          new Person {},
          new Person {IneligibleReasonGuid = IneligibleReasonEnum.Unidentifiable_Unknown_person},
        };
      _persons.ForEach(delegate(Person p)
        {
          p.CanVote = true;
          p.PersonGuid = Guid.NewGuid();
        });
    }
 public void Init()
 {
   _fakes = new AnalyzerFakes();
 }