~ubuntu-branches/ubuntu/trusty/libswingx-java/trusty

« back to all changes in this revision

Viewing changes to src/test/org/jdesktop/swingx/treetable/TreeTableModelIssues.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-03-06 00:28:45 UTC
  • mfrom: (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110306002845-escned3cbqp5qx0t
Tags: 1:1.6.2-1
* New upstream release.
* Switch to maven as build system:
  - d/control: drop ant, add maven-debian-helper
  - d/rules: use maven.mk
* d/patches/pom.diff: drop, uneeded since upstream fixed its dependencies.
* d/watch: update to use java.net directly.
* d/rules: force debian version for JARs (Closes: #603495).
* d/copyright: Update to lastest DEP-5 r166.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Id: TreeTableModelIssues.java 3201 2009-01-22 10:46:42Z kleopatra $
3
 
 *
4
 
 * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5
 
 * Santa Clara, California 95054, U.S.A. All rights reserved.
6
 
 */
7
 
package org.jdesktop.swingx.treetable;
8
 
 
9
 
import java.util.logging.Logger;
10
 
 
11
 
import javax.swing.tree.TreePath;
12
 
 
13
 
import org.jdesktop.swingx.InteractiveTestCase;
14
 
import org.junit.Test;
15
 
import org.junit.runner.RunWith;
16
 
import org.junit.runners.JUnit4;
17
 
 
18
 
/**
19
 
 * 
20
 
 * Known issues around TreeTableModel and related classes.
21
 
 * 
22
 
 */
23
 
@RunWith(JUnit4.class)
24
 
public class TreeTableModelIssues extends InteractiveTestCase {
25
 
    @SuppressWarnings("unused")
26
 
    private static final Logger LOG = Logger
27
 
        .getLogger(TreeTableModelIssues.class.getName());
28
 
    
29
 
    public static void main(String[] args) {
30
 
        TreeTableModelIssues test = new TreeTableModelIssues();
31
 
        try {
32
 
            test.runInteractiveTests();
33
 
        } catch (Exception e) {
34
 
            e.printStackTrace();
35
 
        }
36
 
    }
37
 
    
38
 
    
39
 
    /**
40
 
     * TreePath issue: null must not be allowed as path element.
41
 
     * The constructor doesn't cope with array containing null.
42
 
     */
43
 
    @Test
44
 
    public void testTreeStructureChangedEmptyPath() {
45
 
       TreePath path = new TreePath(new Object[] {null});
46
 
       assertNotNull("TreePath must not contain null path elements", 
47
 
               path.getLastPathComponent()); 
48
 
    }
49
 
 
50
 
 
51
 
}