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:
junit.framework.Test

public class IdeUtilsTest
extends junit.framework.TestCase

Test for IdeUtils

Version:
$Id: IdeUtilsTest.java 728549 2008-12-21 23:11:22Z bentmann $
Author:
Carlos Sanchez

Constructor Summary
IdeUtilsTest()
           
 
Method Summary
 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 java.lang.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:
java.lang.Exception

testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndFileToAddRelative

public void testToRelativeAndFixSeparator_WhereOnDifferentDrivesAndFileToAddRelative()
                                                                              throws java.lang.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:
java.lang.Exception

testToRelativeAndFixSeparator_MECLIPSE_261

public void testToRelativeAndFixSeparator_MECLIPSE_261()
                                                throws java.lang.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:
java.lang.Exception


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