|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. * * BrowserPropertyEditorTest.java * NetBeans JUnit based test * * * Created on November 2, 2001, 10:42 AM */ package org.netbeans.modules.extbrowser; import junit.framework.*; import org.netbeans.junit.*; import java.util.*; /** * * @author rk109395 */ public class DdeBrowserSupportTest extends NbTestCase { public DdeBrowserSupportTest (java.lang.String testName) { super(testName); } public static void main(java.lang.String[] args) { junit.textui.TestRunner.run(suite()); } /** Test of getNthField method, of class org.netbeans.modules.extbrowser.DdeBrowserSupport. */ public void testGetNthField () { System.out.println ("testGetNthField"); String s = "\"first\",second,,,5,,"; if (!"first".equals (DdeBrowserSupport.getNthField (s,1)) || !"second".equals (DdeBrowserSupport.getNthField (s,2)) || !"5".equals (DdeBrowserSupport.getNthField (s,5))) fail ("testGetNthField failed"); } /** Test of getDWORDAtOffset method, of class org.netbeans.modules.extbrowser.DdeBrowserSupport. */ public void testGetDWORDAtOffset () { System.out.println ("testGetDWORDAtOffset"); byte [] a = { (byte)0, (byte)0x20, (byte)0x55, (byte)0x77, (byte)0x99 }; int i = DdeBrowserSupport.getDWORDAtOffset (a, 1); if (i != 0x99775520) fail ("testGetDWORDAtOffset failed: "+Integer.toHexString (i)); } public static Test suite () { TestSuite suite = new NbTestSuite (DdeBrowserSupportTest.class); return suite; } // Add test methods here, they have to start with 'test' name. // for example: // public void testHello() {} } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.