Package com.darkhonor.rage.model

Examples of com.darkhonor.rage.model.Version


    public void testFind()
    {
        System.out.println("find");
        assertTrue(instance.isOpen());
        Double versionNumber = new Double(2.1);
        Version expResult = new Version(versionNumber);
        Version result = instance.find(versionNumber);
        assertNotNull(result);
        assertEquals(expResult, result);
        assertTrue(instance.isOpen());
    }
View Full Code Here


    public void testFindNoResult()
    {
        System.out.println("findNoResult");
        assertTrue(instance.isOpen());
        Double versionNumber = new Double(1.2);
        Version expResult = null;
        Version result = instance.find(versionNumber);
        assertNull(result);
        assertEquals(expResult, result);
        assertTrue(instance.isOpen());
    }
View Full Code Here

    public void testFindIdNoResult()
    {
        System.out.println("findIdNoResult");
        assertTrue(instance.isOpen());
        Double id = new Double(1.2);
        Version expResult = null;
        Version result = instance.find(id);
        assertNull(result);
        assertEquals(expResult, result);
        assertTrue(instance.isOpen());
    }
View Full Code Here

    public void testFindIdNegativeId()
    {
        System.out.println("findIdNegativeId");
        assertTrue(instance.isOpen());
        Double id = new Double(-1.2);
        Version result = instance.find(id);
    }
View Full Code Here

    public void testFindIdZeroId()
    {
        System.out.println("findIdZeroId");
        assertTrue(instance.isOpen());
        Double id = new Double(0.0);
        Version result = instance.find(id);
    }
View Full Code Here

    public void testFindNullVersion()
    {
        System.out.println("findNullVersion");
        assertTrue(instance.isOpen());
        Double versionNumber = null;
        Version result = instance.find(versionNumber);
    }
View Full Code Here

    public void testFindClosedConnection()
    {
        System.out.println("findClosedConnection");
        assertTrue(instance.isOpen());
        Double versionNumber = new Double(1.2);
        Version version = new Version(versionNumber);
        instance.closeConnection();
        assertFalse(instance.isOpen());
        Version result = instance.find(versionNumber);
    }
View Full Code Here

    @Test
    public void testDelete()
    {
        System.out.println("delete");
        assertTrue(instance.isOpen());
        Version version = instance.find(new Double(2.1));
        assertNotNull(version);
        instance.delete(version);
        assertTrue(instance.isOpen());
        Version result = instance.find(new Double(2.1));
        assertNull(result);
    }
View Full Code Here

    @Test(expected=IllegalStateException.class)
    public void testDeleteClosedConnection()
    {
        System.out.println("deleteClosedConnection");
        assertTrue(instance.isOpen());
        Version version = instance.find(new Double(2.1));
        assertNotNull(version);
        instance.closeConnection();
        assertFalse(instance.isOpen());
        instance.delete(version);
    }
View Full Code Here

    @Test(expected=IllegalArgumentException.class)
    public void testDeleteNullVersionId()
    {
        System.out.println("deleteNullVersionId");
        assertTrue(instance.isOpen());
        Version version = new Version();
        instance.delete(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.