Clazz Module Test Specification
Author: Marek Grummich
Version: 3.6
Last update: 2004/01/06
Introduction: This is test specification for clazz module. The Clazz module provides read-only object model of sourceless classes. It is based on classfile - the class parsing library.
Comment:
Table of Contents
|
Purpose: This test suite checks, if all elements of .class file are correctly recognized.
Setup: Mount clazztest.jar to repository. Source code of this class is here.
| # | Test case | Description |
| 1 | Recognition of class |
1. Expand ClazzTest.class
|
|
|
RESULT:
There is one class under the ClazzTest: public class ClazzTest extends javax.swing.JPanel |
| 2 | Recognition of inner classes |
|
|
RESULT:
There is one inner class in the ClazzTest: public static class InnerClass. |
| 3 | Recognition of inner interfaces |
|
|
RESULT:
There is one inner interface in the ClazzTest: public interface InnerInterface |
| 4 | Recognition of methods |
|
RESULT:
There are 4 methods in ClazzTest: 1. private void initComponents() 2. public boolean isOk() 3. public void setOk(boolean ok) 4. protected static void testMethod(java.lang.String name) throws java.io.IOException |
| 5 | Recognition of fields |
|
RESULT:
There are 3 fields in the class: 1. public static final char CONSTANT = 0 2. private Object testField = null 3. private boolean ok |
| 6 | Recognition of constructors |
1. Expand constructors node
|
|
RESULT:
There are two constructors 1. public ClazzTest() 2. public ClazzTest(final java.lang.String name) throws java.io.IOException |
Teardown:
|
|
Purpose: This testsuite checks copy/paste feature. Note that serialize feature works with beans only.
Setup: Mount clazztest.jar to repository. Source code of this class is here.
| # | Test case | Description |
| 1 | Copy/Paste | Copy |
1. Select ClazzTest 2. Perform Copy 3. Select different package 4. Perform Paste | Copy
|
|
|
RESULT:
Class is copied to target folder. Red x appears, but this the class is still parsable. |
| 2 | Cut/Paste |
1. Select ClazzTest 2. Perform Copy 3. Select different package 4. Perform Paste
|
|
|
RESULT:
Class is moved from source to target folder. Red x appears, but this the class is still parsable. |
| 3 | Copy/Paste | Create Link |
1. Select ClazzTest 2. Perform Copy 3. Select different package 4. Perform Paste | Create Link
|
|
|
RESULT:
New link is created |
| 4 | Copy/Paste | Serialize |
1. Select ClazzTest 2. Perform Copy 3. Select different package 4. Perform Paste | Create Serialize
|
|
|
RESULT:
New .ser file is created in target folder. Check if all elements java are visible in Explorer by browsing the .ser file. Use Element Recognition Suite. Together with class node, there is another node within the class file: serialized strem, which holds instance of org.netbeans.test.ClazzTest and it's serialized data. |
| 5 | Copy/Paste | Default Instance |
1. Select ClazzTest 2. Perform Copy 3. Select different package 4. Perform Paste | Default Instance
|
|
|
RESULT:
New default instance is created in target folder. |
Teardown:
|
|
Purpose: Tests if clazz data object has correct executor/debugger.
Setup: Unjar clazztest.jar and mount target as a local directory. Source code of this class is here.
| # | Test case | Description |
| 1 | Executor |
|
|
RESULT:
Default executor is External Execution |
| 2 | Debuggger |
|
|
RESULT:
Default debugger is Default debugging |
Teardown:
|
Generated: Fri Jan 09 11:54:16 CET 2004