Package com.darkhonor.rage.model

Examples of com.darkhonor.rage.model.Version


    @Test
    public void testCheckDbVersion()
    {
        System.out.println("checkDbVersion");
        assertTrue(instance.isOpen());
        Version appVersion = new Version(new Double(2.1));
        boolean expResult = true;
        boolean result = instance.checkDbVersion(appVersion);
        assertEquals(expResult, result);
        assertTrue(instance.isOpen());
    }
View Full Code Here


    @Test
    public void testCheckDbVersionNoMatch()
    {
        System.out.println("checkDbVersionNoMatch");
        Version appVersion = new Version(new Double(1.2));
        boolean expResult = false;
        boolean result = instance.checkDbVersion(appVersion);
        assertEquals(expResult, result);
        assertTrue(instance.isOpen());
    }
View Full Code Here

    @Test(expected=NullPointerException.class)
    public void testCheckDbVersionNullVersion()
    {
        System.out.println("checkDbVersionNullVersion");
        assertTrue(instance.isOpen());
        Version appVersion = null;
        boolean result = instance.checkDbVersion(appVersion);
    }
View Full Code Here

    @Test(expected=IllegalArgumentException.class)
    public void testCheckDbVersionVersionIdNull()
    {
        System.out.println("checkDbVersionVersionIdNull");
        assertTrue(instance.isOpen());
        Version appVersion = new Version();
        boolean result = instance.checkDbVersion(appVersion);
    }
View Full Code Here

    @Test(expected=IllegalStateException.class)
    public void testCheckDbVersionClosedConnection()
    {
        System.out.println("checkDbVersionClosedConnection");
        assertTrue(instance.isOpen());
        Version appVersion = new Version(new Double(2.1));
        instance.closeConnection();
        assertFalse(instance.isOpen());
        boolean result = instance.checkDbVersion(appVersion);
    }
View Full Code Here

    public void testCreate()
    {
        System.out.println("create");
        assertTrue(instance.isOpen());
        Double versionNumber = new Double(10.4);
        Version version = new Version(versionNumber);
        Double newId = instance.create(version);
        Double expectedId = new Double(10.4);
        assertEquals(expectedId, newId);
        Version result = instance.find(versionNumber);
        assertNotNull(result);
        assertEquals(version, result);
        assertTrue(instance.isOpen());
    }
View Full Code Here

    @Test(expected=IllegalArgumentException.class)
    public void testCreateExistingVersion()
    {
        System.out.println("createExistingVersion");
        assertTrue(instance.isOpen());
        Version version = new Version(new Double(2.1));
        Double newId = instance.create(version);
    }
View Full Code Here

    @Test(expected=NullPointerException.class)
    public void testCreateNullVersion()
    {
        System.out.println("createNullVersion");
        assertTrue(instance.isOpen());
        Version version = null;
        Double newId = instance.create(version);
    }
View Full Code Here

    @Test(expected=IllegalStateException.class)
    public void testCreateClosedConnection()
    {
        System.out.println("createClosedConnection");
        assertTrue(instance.isOpen());
        Version version = new Version(new Double(10.4));
        instance.closeConnection();
        assertFalse(instance.isOpen());
        Double newId = instance.create(version);
    }
View Full Code Here

    @Test(expected=IllegalArgumentException.class)
    public void testCreateNullVersionId()
    {
        System.out.println("createNullVersionId");
        assertTrue(instance.isOpen());
        Version version = new Version();
        Double newId = instance.create(version);
    }
View Full Code Here

TOP

Related Classes of com.darkhonor.rage.model.Version

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.