net.sourceforge.pmd.cpd

## Class CPDTest

- java.lang.Object
- - net.sourceforge.pmd.cpd.CPDTest

    public class CPDTest
    extends Object

Unit test for `CPD`

### Constructor Summary

Constructors
Constructor and Description
`CPDTest()`

### Method Summary

Methods
`void` `setup()`
`void` `testFileAddedAsSymlinkAndReal()` A file should be added only once - even if it was found twice, because of a sym link.
`void` `testFileAddedWithRelativePath()` Add a file with a relative path - should still be added and not be detected as a sym link.
`void` `testFileSectionWithBrokenSymlinks()` A broken symlink (which is basically a not existing file), should be skipped.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CPDTest

    public CPDTest()

### Method Detail

#### setup

    public void setup()
               throws Exception

Throws:
  `Exception`

#### testFileSectionWithBrokenSymlinks

    public void testFileSectionWithBrokenSymlinks()
                                           throws Exception

A broken symlink (which is basically a not existing file), should be skipped.

Throws:
  `Exception` - any error

#### testFileAddedAsSymlinkAndReal

    public void testFileAddedAsSymlinkAndReal()
                                       throws Exception

A file should be added only once - even if it was found twice, because of a sym link.

Throws:
  `Exception` - any error

#### testFileAddedWithRelativePath

    public void testFileAddedWithRelativePath()
                                       throws Exception

Add a file with a relative path - should still be added and not be detected as a sym link.

Throws:
  `Exception` - any error