\i Infrastructure-TestHeader.sql

\echo '$Id: 1-basic-Yes-or-No.sql 452 2008-01-09 14:24:56Z dflater $'
\echo
\echo 'Small Yes-or-No contest, no rejected ballots.'
\echo 'Ballot styles:  1'
\echo 'Reporting contexts:  1'

\i Infrastructure-VoteSchema.sql

insert into ReportingContext values
  ('Precinct 1');

insert into Contest (ContestId, Description, CountingLogic, N,
                     MaxWriteIns, Rotate) values
  (1, 'Property Tax Decrease Proposal', 'N-of-M', 1, 0, false),
  (2, 'Sales Tax Increase Proposal', 'N-of-M',  1, 0, false);

insert into Choice (ChoiceId, ContestId, Name, IsWriteIn) values
  (0,  1, 'No (2)', false),
  (1,  1, 'Yes (6)', false),
  (2,  2, 'No (3)', false),
  (3,  2, 'Yes (2)', false);


insert into BallotStyle (StyleId, Name) values
  (1, 'Precinct 1 Style');

insert into BallotStyleContestAssociation (StyleId, ContestId) values
  (1, 1),
  (1, 2);

insert into BallotStyleReportingContextAssociation (StyleId,
						    ReportingContext) values
  (1, 'Precinct 1');


insert into Ballot (BallotId, StyleId, Accepted) values
  (0, 1, true),
  (1, 1, true),
  (2, 1, true),
  (3, 1, true),
  (4, 1, true),
  (5, 1, true),
  (6, 1, true),
  (7, 1, true),
  (8, 1, true),
  (9, 1, true),
  (10, 1, true),
  (11, 1, true);

insert into VoterInput (BallotId, ChoiceId, Value) values
  (1, 2, 1),
  (1, 1, 1),
  (2, 0, 1),
  (2, 2, 1),
  (3, 0, 1),
  (3, 1, 1),
  (3, 3, 1),
  (4, 1, 1),
  (4, 2, 1),
  (5, 1, 1),
  (5, 3, 1),
  (6, 1, 1),
  (7, 0, 1),
  (7, 1, 1),
  (8, 0, 1),
  (9, 1, 1),
  (10, 1, 1),
  (11, 0, 1),
  (11, 1, 1);

\i Infrastructure-TestHook.sql
\i Infrastructure-IntegrityChecks.sql
\! ReportGenerator/ReportGenerator "Precinct 1"
\i Infrastructure-TestFooter.sql
