Package gov.nysenate.openleg.model

Examples of gov.nysenate.openleg.model.Vote


      Storage storage, String billKey, String voteSobi, Vote expected)
  {
    File[] voteSobiFile = TestHelper.getFilesByName(sobiDirectory, voteSobi);
    TestHelper.processFile(env, voteSobiFile);
    Bill bill = TestHelper.getBill(storage, billKey);
    Vote testVote = bill.getVotes().get(0);
    // Look into ListAssert.assertEquals if we don't care about the order of the lists.
    assertThat(testVote.getAyes(), is(expected.getAyes()));
    assertThat(testVote.getAyeswr(), is(expected.getAyeswr()));
    assertThat(testVote.getAbsent(), is(expected.getAbsent()));
    assertThat(testVote.getAbstains(), is(expected.getAbstains()));
    assertThat(testVote.getExcused(), is(expected.getExcused()));
    assertThat(testVote.getNays(), is(expected.getNays()));
  }
View Full Code Here


    File[] voteSobiFile = TestHelper.getFilesByName(sobiDirectory, committeeVoteSobi);
    TestHelper.processFile(env, voteSobiFile);
    Meeting meeting = TestHelper.getMeeting(storage, meetingKey);
    List<Bill> bills = meeting.getBills();
    Bill bill = TestHelper.getBillByName(bills, billName);
    Vote testVote = bill.getVotes().get(0);
    assertThat(testVote.getAyes(), is(expected.getAyes()));
    assertThat(testVote.getAyeswr(), is(expected.getAyeswr()));
    assertThat(testVote.getAbsent(), is(expected.getAbsent()));
    assertThat(testVote.getAbstains(), is(expected.getAbstains()));
    assertThat(testVote.getExcused(), is(expected.getExcused()));
    assertThat(testVote.getNays(), is(expected.getNays()));
  }
View Full Code Here

    assertThat(testVote.getNays(), is(expected.getNays()));
  }

    public static boolean voteCheck(Bill theBill, Vote vote)
    {  
        Vote v=theBill.getVotes().get(0);
        assertThat(v.getAyes(), is(vote.getAyes()));
        assertThat(v.getAbsent(), is(vote.getAbsent()));
        assertThat(v.getAbstains(), is(vote.getAbstains()));
        assertThat(v.getExcused(), is(vote.getExcused()));
        assertThat(v.getNays(), is(vote.getNays()));
        return true;
       
    }
View Full Code Here

                "Parker","Peralta", "Perkins", "Rivera", "Saland", "Sampson", "Savino", "Serrano", "Smith", "Squadron", "Stavisky",
                "Stewart-Cousin", "Valesky" };
        String[] nayVotes = {"Ball", "Bonacic", "DeFrancisco", "Diaz", "Farley", "Flanagan", "Fuschillo", "Gallivan", "Golden",
                "Griffo", "Hannon", "Johnson", "Lanza", "Larkin", "LaValle", "Libous", "Little", "Marcellino", "Martins", "Maziarz",
                "Nozzolio", "O'Mara", "Ranzenhofer", "Ritchie", "Robach", "Seward", "Skelos", "Young", "Zeldin" };
        Vote expectedVote = new Vote();
        // Add any non-null vote types to vote object.
        expectedVote.setAyes(Arrays.asList(ayeVotes));
        expectedVote.setNays(Arrays.asList(nayVotes));
        VoteTests.testSenateVotes(env, sobiDirectory, storage, billKey, voteSobi, expectedVote);
    }
View Full Code Here

      assertEquals(theBill.getSponsor().getFullname(),"KLEIN");
 
      // Tests for the SOBI.D130114.T233653.TXT
      TestHelper.processFileC(env ,file.get(5));
      theBill=(Bill)storage.get("2013/bill/S2230-2013", Bill.class);
      Vote vote=processExpectedVote();
      boolean var=VoteTests.voteCheck(theBill,vote);
      assertEquals(var,true);
     
     
   // Tests for the SOBI.D130115.T93046.TXT
View Full Code Here

        List<String> y=Arrays.asList(yes);
        List<String> n=Arrays.asList(no);
        List<String> e=Arrays.asList(excluded);
        List<String> abstain=Arrays.asList(abstained);
        List<String> ab=Arrays.asList(absent);
        Vote vote=new Vote();
        vote.setAyes(y);
        vote.setNays(n);
        vote.setExcused(e);
        vote.setAbsent(ab);
        vote.setAbstains(abstain);
        return vote;
   
  }
View Full Code Here

        theBill=(Bill)storage.get("2011/bill/S1462A-2011", Bill.class);
        String[] voteDate=(theBill.getVotes().get(0).getOid()).split("-");
      String date=voteDate[2];
        // Checking vote Date
      assertEquals(date.equals("2011/06/14"),true);
        Vote vote=processExpectedVote2011S1462A();
      boolean flag=VoteTests.voteCheck(theBill,vote);
        assertEquals(flag,true);

     // Test for SOBI.D110614.T185240.TXT
        TestHelper.processFileC(env ,file.get(13));
View Full Code Here

      String[] voteDate=(theBill.getVotes().get(0).getOid()).split("-");
    String date=voteDate[2];
        // Checking vote Date
    assertEquals(date.equals("2012/06/11"),true);
    Vote vote=processExpectedVote2011S1462D();
    boolean flag=VoteTests.voteCheck(theBill,vote);
      assertEquals(flag,true);
    }
View Full Code Here

        List<String> y=Arrays.asList(yes);
        List<String> n=Arrays.asList(no);
        List<String> e=Arrays.asList(excluded);
        List<String> abstain=Arrays.asList(abstained);
        List<String> ab=Arrays.asList(absent);
        Vote vote=new Vote();
        vote.setAyes(y);
        vote.setNays(n);
        vote.setExcused(e);
        vote.setAbsent(ab);
        vote.setAbstains(abstain);
        return vote;

  }
View Full Code Here

        List<String> y=Arrays.asList(yes);
        List<String> n=Arrays.asList(no);
        List<String> e=Arrays.asList(excluded);
        List<String> abstain=Arrays.asList(abstained);
        List<String> ab=Arrays.asList(absent);
        Vote vote=new Vote();
        vote.setAyes(y);
        vote.setNays(n);
        vote.setExcused(e);
        vote.setAbsent(ab);
        vote.setAbstains(abstain);
        return vote;

  }
View Full Code Here

TOP

Related Classes of gov.nysenate.openleg.model.Vote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.