~ubuntu-branches/ubuntu/utopic/maven-enforcer/utopic

« back to all changes in this revision

Viewing changes to enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestAbstractVersionEnforcer.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-12 22:30:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: package-import@ubuntu.com-20110912223016-e2pk04avoq8bur7t
Tags: 1.0-1
* Team upload
* New upstream release.
* Add more Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.apache.maven.plugins.enforcer;
 
2
 
1
3
/*
2
4
 * Licensed to the Apache Software Foundation (ASF) under one
3
5
 * or more contributor license agreements.  See the NOTICE file
16
18
 * specific language governing permissions and limitations
17
19
 * under the License.
18
20
 */
19
 
package org.apache.maven.plugins.enforcer;
20
21
 
21
22
import junit.framework.TestCase;
22
23
 
31
32
// TODO: Auto-generated Javadoc
32
33
/**
33
34
 * The Class TestAbstractVersionEnforcer.
34
 
 * 
 
35
 *
35
36
 * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
36
37
 */
37
38
public class TestAbstractVersionEnforcer
40
41
 
41
42
    /**
42
43
     * Test contains version.
43
 
     * 
 
44
     *
44
45
     * @throws InvalidVersionSpecificationException the invalid version specification exception
45
46
     */
46
47
    public void testContainsVersion()
83
84
        version = new DefaultArtifactVersion ("2.1.0-M1-RC12");
84
85
        assertTrue( AbstractVersionEnforcer.containsVersion( VersionRange.createFromVersionSpec( "[2.1.0-M1-RC12,)" ), version ) );
85
86
        assertFalse( AbstractVersionEnforcer.containsVersion( VersionRange.createFromVersionSpec( "[2.1.0-M1,)" ), version ) );
86
 
        
 
87
 
87
88
    }
88
89
 
89
90
    /**
90
91
     * Enforce false.
91
 
     * 
 
92
     *
92
93
     * @param rule the rule
93
94
     * @param log the log
94
95
     * @param var the var