Package gov.nysenate.openleg.model

Examples of gov.nysenate.openleg.model.Bill


        actionStrings.add(new String[]{"06/24/11", "PASSED SENATE"});
        actionStrings.add(new String[]{"06/24/11", "RETURNED TO ASSEMBLY"});
        actionStrings.add(new String[]{"06/24/11", "delivered to governor"});
        actionStrings.add(new String[]{"06/24/11", "signed chap.95"});

        BillTests.testBillStatusActions(env, sobiDirectory, storage, billKey, actionsSobi, actionStrings, new Bill(billNumber, 2011));
    }
View Full Code Here


*/
public class BillTests
{
    public static void isBillInitiallyNull(Storage storage, String billKey)
    {
        Bill bill = TestHelper.getBill(storage, billKey);
        assertThat(bill, nullValue());
    }
View Full Code Here

    public static void doesBillExistsAfterProcessing(Environment env, File sobiDirectory,
            Storage storage, String billKey, String sobi)
    {
        File[] initialCommit = TestHelper.getFilesByName(sobiDirectory, sobi);
        TestHelper.processFile(env, initialCommit);
        Bill bill = TestHelper.getBill(storage, billKey);
        assertThat(bill, notNullValue());
    }
View Full Code Here

    public static void testPrimeSponsor(Environment env, File sobiDirectory,
            Storage storage, String billKey, String sobi, String expectedSponsorName, Boolean expectedNull)
    {
        File[] initialCommit = TestHelper.getFilesByName(sobiDirectory, sobi);
        TestHelper.processFile(env, initialCommit);
        Bill bill = TestHelper.getBill(storage, billKey);
        if(expectedNull){
            assertThat(bill.getSponsor(), nullValue());
        }
        else{
            String billSponsorName = bill.getSponsor().getFullname();
            assertThat(billSponsorName, equalToIgnoringCase(expectedSponsorName));
        }
    }
View Full Code Here

    public static void testCoSponsors(Environment env, File sobiDirectory,
            Storage storage, String billKey, String sobi, String[] expectedCoSponsors)
    {
        File[] initialCommit = TestHelper.getFilesByName(sobiDirectory, sobi);
        TestHelper.processFile(env, initialCommit);
        Bill bill = TestHelper.getBill(storage, billKey);
        List<Person> billCoSponsors = bill.getCoSponsors();
        String[] coSponsorNames = new String[billCoSponsors.size()];
        int i = 0;
        for(Person person: billCoSponsors) {
            coSponsorNames[i] = person.getFullname();
            i++;
View Full Code Here

    public static void testMultiSponsors(Environment env, File sobiDirectory,
            Storage storage, String billKey, String sobi, String[] expectedMultiSponsors)
    {
        File[] initialCommit = TestHelper.getFilesByName(sobiDirectory, sobi);
        TestHelper.processFile(env, initialCommit);
        Bill bill = TestHelper.getBill(storage, billKey);
        List<Person> billMultiSponsors = bill.getMultiSponsors();
        String[] multiSponsorNames = new String[billMultiSponsors.size()];
        int i = 0;
        for(Person person: billMultiSponsors){
            multiSponsorNames[i] = person.getFullname();
            i++;
View Full Code Here

    public static void doesBillTextExist(Environment env, File sobiDirectory,
            Storage storage, String billKey, String billTextSobi)
    {
        File[] billTextFile = TestHelper.getFilesByName(sobiDirectory, billTextSobi);
        TestHelper.processFile(env, billTextFile);
        Bill bill = TestHelper.getBill(storage, billKey);
        assertThat(bill.getFulltext(), notNullValue());
    }
View Full Code Here

    public static void testBillTitle(Environment env, File sobiDirectory,
            Storage storage, String billKey, String shortTitleSobi, String expectedShortTitle)
    {
        File[] shortTitleFile = TestHelper.getFilesByName(sobiDirectory, shortTitleSobi);
        TestHelper.processFile(env, shortTitleFile);
        Bill bill = TestHelper.getBill(storage, billKey);
        assertThat(bill.getTitle(), is(expectedShortTitle));
    }
View Full Code Here

            commitFile = TestHelper.getFilesByName(sobiDirectory, commit);
            TestHelper.processFile(env, commitFile);
        }
        File[] deleteCommit = TestHelper.getFilesByName(sobiDirectory, deleteStatusSobi);
        TestHelper.processFile(env, deleteCommit);
        Bill deletedBill = TestHelper.getBill(storage, billKey);
        assertThat(deletedBill, nullValue());
    }
View Full Code Here

    {
        File[] initialCommit = TestHelper.getFilesByName(sobiDirectory, billTextSobi);
        TestHelper.processFile(env, initialCommit);
        File[] deleteTextCommit = TestHelper.getFilesByName(sobiDirectory, deleteTextSobi);
        TestHelper.processFile(env, deleteTextCommit);
        Bill deletedTextBill = TestHelper.getBill(storage, billKey);
        // After deleted, JSON stores empty values as "" instead of null.
        String expectedText = "";
        assertThat(deletedTextBill.getFulltext(), is(expectedText));
    }
View Full Code Here

TOP

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

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.