01: package com.ibm.emb.test;
02:
03: import java.io.File;
04: import java.io.IOException;
05:
06: import javax.emb.MediaException;
07:
08: import com.ibm.emb.junit.EMBTestCaseBase;
09: import com.ibm.emb.junit.EMBTestRunner;
10: import com.ibm.sigtest.ProjectDesc;
11:
12: public class SignatureTest extends EMBTestCaseBase {
13:
14: /**
15: * Constructor for SignatureTest
16: * @param name
17: */
18: public SignatureTest(String name) throws MediaException {
19: super (name);
20: }
21:
22: public static void main(String args[]) {
23: EMBTestRunner.run(SignatureTest.class);
24: }
25:
26: /**
27: * <pre>
28: *
29: *
30: *
31: * TestCase Name: Signature Test
32: * TestCase Number: EMB044
33: *
34: * setup: generate project file with method signatures
35: *
36: * test procedure:
37: * 1.call compareProjectFile
38: * expected result: result is null
39: *
40: *
41: *
42: * </pre>
43: */
44: public void testEMB044() throws IOException, ClassNotFoundException {
45: // generate list of class signatures for project
46: String classNamesFilePath = embTestConfig.getMediaDir()
47: + File.separatorChar
48: + embTestConfig.getListOfClassNamesFile();
49: String sigFilePath = embTestConfig.getMediaDir()
50: + File.separatorChar
51: + embTestConfig.getClassSignatureFile();
52: // should not regenerate signature file unless needed
53: // SigTestUtils.generateProjectFile(classNamesFilePath, sigFilePath,
54: // true);
55:
56: File projFile = new File(sigFilePath);
57: String result = ProjectDesc.compareProjectFile(projFile);
58:
59: assertNull(result, result);
60: testTrace("test 1 passed");
61: succeed();
62:
63: }
64:
65: }
|