Package org.eclipse.sapphire

Examples of org.eclipse.sapphire.VersionConstraint$Range$Limit


   
    @Test

    public void testComplexVersionConstraint()
    {
        final VersionConstraint constraint = new VersionConstraint( "1.2.3,3.4,[5.2-6.0),[8.3" );
       
        assertFalse( constraint.check( new Version( "1.2" ) ) );
        assertFalse( constraint.check( new Version( "1.2.1" ) ) );
        assertTrue( constraint.check( new Version( "1.2.3" ) ) );
        assertFalse( constraint.check( new Version( "1.2.4" ) ) );
        assertFalse( constraint.check( new Version( "3.3" ) ) );
        assertTrue( constraint.check( new Version( "3.4" ) ) );
        assertFalse( constraint.check( new Version( "3.4.1" ) ) );
        assertFalse( constraint.check( new Version( "3.5" ) ) );
        assertFalse( constraint.check( new Version( "5.0" ) ) );
        assertFalse( constraint.check( new Version( "5.1" ) ) );
        assertTrue( constraint.check( new Version( "5.2" ) ) );
        assertTrue( constraint.check( new Version( "5.3" ) ) );
        assertTrue( constraint.check( new Version( "5.9.9.9" ) ) );
        assertFalse( constraint.check( new Version( "6.0" ) ) );
        assertFalse( constraint.check( new Version( "6.1" ) ) );
        assertFalse( constraint.check( new Version( "7.3" ) ) );
        assertFalse( constraint.check( new Version( "8.0" ) ) );
        assertFalse( constraint.check( new Version( "8.2" ) ) );
        assertTrue( constraint.check( new Version( "8.3" ) ) );
        assertTrue( constraint.check( new Version( "8.3.4.5" ) ) );
        assertTrue( constraint.check( new Version( "8.5" ) ) );
        assertTrue( constraint.check( new Version( "9.0" ) ) );
        assertTrue( constraint.check( new Version( "55.0" ) ) );
    }
View Full Code Here


   
    @Test

    public void testVersionConstraintSpaceTolerance()
    {
        final VersionConstraint constraint = new VersionConstraint( "   1.2.3, 3.4  ,   [   5.2  -   6.0) ,    [  8.3    " );
       
        assertFalse( constraint.check( new Version( "1.2" ) ) );
        assertFalse( constraint.check( new Version( "1.2.1" ) ) );
        assertTrue( constraint.check( new Version( "1.2.3" ) ) );
        assertFalse( constraint.check( new Version( "1.2.4" ) ) );
        assertFalse( constraint.check( new Version( "3.3" ) ) );
        assertTrue( constraint.check( new Version( "3.4" ) ) );
        assertFalse( constraint.check( new Version( "3.4.1" ) ) );
        assertFalse( constraint.check( new Version( "3.5" ) ) );
        assertFalse( constraint.check( new Version( "5.0" ) ) );
        assertFalse( constraint.check( new Version( "5.1" ) ) );
        assertTrue( constraint.check( new Version( "5.2" ) ) );
        assertTrue( constraint.check( new Version( "5.3" ) ) );
        assertTrue( constraint.check( new Version( "5.9.9.9" ) ) );
        assertFalse( constraint.check( new Version( "6.0" ) ) );
        assertFalse( constraint.check( new Version( "6.1" ) ) );
        assertFalse( constraint.check( new Version( "7.3" ) ) );
        assertFalse( constraint.check( new Version( "8.0" ) ) );
        assertFalse( constraint.check( new Version( "8.2" ) ) );
        assertTrue( constraint.check( new Version( "8.3" ) ) );
        assertTrue( constraint.check( new Version( "8.3.4.5" ) ) );
        assertTrue( constraint.check( new Version( "8.5" ) ) );
        assertTrue( constraint.check( new Version( "9.0" ) ) );
        assertTrue( constraint.check( new Version( "55.0" ) ) );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )

    public void testVersionConstraintErrorHandling01()
    {
        new VersionConstraint( null );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )

    public void testVersionConstraintErrorHandling02()
    {
        new VersionConstraint( "" );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )

    public void testVersionConstraintErrorHandling03()
    {
        new VersionConstraint( "   " );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )

    public void testVersionConstraintErrorHandling04()
    {
        new VersionConstraint( "[" );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )

    public void testVersionConstraintErrorHandling05()
    {
        new VersionConstraint( ")" );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )

    public void testVersionConstraintErrorHandling06()
    {
        new VersionConstraint( "[[1.2.3" );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )
   
    public void testVersionConstraintErrorHandling07()
    {
        new VersionConstraint( "1.2.3))" );
    }
View Full Code Here

   
    @Test( expected = IllegalArgumentException.class )
   
    public void testVersionConstraintErrorHandling08()
    {
        new VersionConstraint( "[1.2.3-" );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.VersionConstraint$Range$Limit

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.