Package cat.quickdb.binding.model

Examples of cat.quickdb.binding.model.BindingObject


                QuickDBTests.user, QuickDBTests.pass, QuickDBTests.scheme);
    }

    @Test
    public void testSave(){
        BindingObject bind = new BindingObject();
        bind.setBirth(new java.sql.Date(104, 4, 20));
        bind.setName("quickdb");
        bind.setSalary(3000.50);

        Assert.assertTrue(bind.save());
    }
View Full Code Here


        Assert.assertTrue(bind.save());
    }

    @Test
    public void testSaveGetIndex(){
        BindingObject bind = new BindingObject();
        bind.setBirth(new java.sql.Date(104, 4, 20));
        bind.setName("quickdb");
        bind.setSalary(3000.50);

        Assert.assertTrue((bind.saveGetIndex() > 0));
    }
View Full Code Here

        Assert.assertTrue((bind.saveGetIndex() > 0));
    }

    @Test
    public void testObtain(){
        BindingObject bind = new BindingObject();

        bind.obtain().If("name").equal("quickdb").find();
        Assert.assertEquals("quickdb", bind.getName());
        Assert.assertEquals(3000.50, bind.getSalary());
    }
View Full Code Here

        Assert.assertEquals(3000.50, bind.getSalary());
    }

    @Test
    public void testObtainWhere(){
        BindingObject bind = new BindingObject();

        bind.obtainWhere("name = 'quickdb'");
        Assert.assertEquals("quickdb", bind.getName());
        Assert.assertEquals(3000.50, bind.getSalary());
    }
View Full Code Here

        Assert.assertEquals(3000.50, bind.getSalary());
    }

    @Test
    public void testObtainString(){
        BindingObject bind = new BindingObject();

        bind.obtain("name = 'quickdb'");
        Assert.assertEquals("quickdb", bind.getName());
        Assert.assertEquals(3000.50, bind.getSalary());
    }
View Full Code Here

        Assert.assertEquals(3000.50, bind.getSalary());
    }

    @Test
    public void testObtainSelect(){
        BindingObject bind = new BindingObject();

        bind.obtainSelect("SELECT * FROM BindingObject WHERE name = 'quickdb'");
        Assert.assertEquals("quickdb", bind.getName());
        Assert.assertEquals(3000.50, bind.getSalary());
    }
View Full Code Here

        Assert.assertEquals(3000.50, bind.getSalary());
    }

    @Test
    public void testDelete(){
        BindingObject bind = new BindingObject();
        bind.setBirth(new java.sql.Date(104, 4, 20));
        bind.setName("quickdb2");
        bind.setSalary(3000.50);

        int index = bind.saveGetIndex();
        Assert.assertTrue( (index > 0) );
        Assert.assertTrue(bind.obtainWhere("id = "+index));

        Assert.assertTrue(bind.delete());
    }
View Full Code Here

        Assert.assertTrue(bind.delete());
    }

    @Test
    public void testModify(){
        BindingObject bind = new BindingObject();
        bind.setBirth(new java.sql.Date(104, 4, 20));
        bind.setName("quickdb3");
        bind.setSalary(3000.50);

        bind.save();
        Assert.assertTrue(bind.obtainWhere("name = 'quickdb3'"));
        bind.setName("quickdb4");

        Assert.assertTrue(bind.modify());

        BindingObject b = new BindingObject();
        Assert.assertTrue(b.obtainWhere("name = 'quickdb4'"));
        Assert.assertEquals("quickdb4", b.getName());
    }
View Full Code Here

TOP

Related Classes of cat.quickdb.binding.model.BindingObject

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.