org.apache.maven.plugin.ide
Class IdeUtilsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.maven.plugin.ide.IdeUtilsTest
All Implemented Interfaces:
Test

public class IdeUtilsTest
extends TestCase

Test for IdeUtils

Version:
$Id: IdeUtilsTest.java 1154560 2011-08-06 17:46:34Z rfscholte $
Author:
Carlos Sanchez

Constructor Summary
IdeUtilsTest()
           
 
Method Summary
 void testGetArtifactVersion()
           
 void testGetProjectNameStringIdeDependency()
           
 void testToRelativeAndFixSeparator_MECLIPSE_261()
          See MECLIPSE-261.
 void testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndAbsolutePaths()
          When the file to add is on a different drive and an absolute path expect that the returned value is the same as the file to add (but with /s)
 void testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndFileToAddRelative()
          When the file to add is a relative file then expect the result to be relative to the basedir (not whatever the current processes basedir is set to)
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdeUtilsTest

public IdeUtilsTest()
Method Detail

testGetProjectNameStringIdeDependency

public void testGetProjectNameStringIdeDependency()

testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndAbsolutePaths

public void testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndAbsolutePaths()
                                                                          throws Exception
When the file to add is on a different drive and an absolute path expect that the returned value is the same as the file to add (but with /s)

Throws:
Exception

testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndFileToAddRelative

public void testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndFileToAddRelative()
                                                                              throws Exception
When the file to add is a relative file then expect the result to be relative to the basedir (not whatever the current processes basedir is set to)

Throws:
Exception

testToRelativeAndFixSeparator_MECLIPSE_261

public void testToRelativeAndFixSeparator_MECLIPSE_261()
                                                throws Exception
See MECLIPSE-261.

When the base dir is a windows root directory the assumption that the full path to fileToAdd is basedir + "/" + fileToAdd is incorrect.

As the canonical form of a windows root dir ends in a slash, whereas the canonical form of any other file does not.

Throws:
Exception

testGetArtifactVersion

public void testGetArtifactVersion()


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.