Package org.javalite.activejdbc.test_models

Examples of org.javalite.activejdbc.test_models.Account


    }

    @Test
    public void shouldAcceptCorrectValueForTotal(){
        deleteAndPopulateTable("accounts");
        Account account = new Account();
        account.set("amount", 1);
        account.set("total", 1);
        System.out.println(account.errors());
        a(account).shouldBe("valid");
    }
View Full Code Here


        a(account).shouldBe("valid");
    }

    @Test
    public void shouldRejectValueBelowMin(){
        Account account = new Account();
        account.set("amount", 1);
        account.set("total", -1);
        a(account).shouldNotBe("valid");
    }
View Full Code Here

        a(account).shouldNotBe("valid");
    }

    @Test
    public void shouldRejectValueAboveMax(){
        Account account = new Account();
        account.set("amount", 1);
        account.set("total", 101);
        a(account).shouldNotBe("valid");
    }
View Full Code Here

        a(account).shouldNotBe("valid");
    }

    @Test
    public void shouldAcceptNullValue(){
        Account account = new Account();
        account.set("amount", 1);
        account.set("total", null);
        a(account).shouldBe("valid");
    }
View Full Code Here

        a(account).shouldBe("valid");
    }

    @Test
    public void shouldRejectNonIntegerValue(){
        Account account = new Account();
        account.set("amount", 1);
        account.set("total", 1.1);
        a(account).shouldNotBe("valid");
    }
View Full Code Here

TOP

Related Classes of org.javalite.activejdbc.test_models.Account

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.