harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6657) A batch of testcases to increase rmi module test coverage
Date Mon, 27 Sep 2010 02:28:37 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915095#action_12915095
] 

Regis Xu commented on HARMONY-6657:
-----------------------------------

some comments for test cases:

+    public void testGetSystem(){
+        
+        try {
+            ActivationSystem as = new MyActivationSystem();
+            ActivationGroupID agid = new ActivationGroupID(as);
+            
+            assertSame(as, agid.getSystem());
+        } catch (ActivationException e) {
+            fail();
+        }
+    }

actually you don't need to catch the exception, just let it go, junit will handle it correctly.

+        assertTrue(!vmid.toString().equals(vmid2.toString()));

Why not assertFalse?

+    public void testIsUnique(){
+        VMID vmid = new VMID();
+        boolean unique = true;
+        try {
+            InetAddress.getLocalHost();
+        } catch (Exception ex) {
+            unique = false;
+        }
+        
+        assertTrue(unique == vmid.isUnique());
+    }
the catch is really necessary?



> A batch of testcases to increase rmi module test coverage
> ---------------------------------------------------------
>
>                 Key: HARMONY-6657
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6657
>             Project: Harmony
>          Issue Type: Test
>          Components: Classlib
>         Environment: x86-32, windows xp and linux.
>            Reporter: Sean Chou
>            Priority: Trivial
>         Attachments: rmi_testcases.patch
>
>
> This is a batch of testcase for rmi module to increase its method coverage. This batch
of testcases are simple and don't contain multiprocess communication like rmid or rmiregistry.
 These testcases are tested under windowsxp and linux on x86_32.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message