|
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-2004 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.tasklist.usertasks.ics; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeEvent; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.Writer; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import junit.framework.*; import org.netbeans.modules.tasklist.client.Suggestion; import org.netbeans.modules.tasklist.client.SuggestionPriority; import org.netbeans.modules.tasklist.providers.SuggestionProvider; import org.netbeans.modules.tasklist.usertasks.UserTask; import org.netbeans.modules.tasklist.usertasks.ics.parser.*; import org.openide.ErrorManager; import org.openide.nodes.Node; import org.openide.util.NbBundle; /** * Tests for the ICS parser * * @author Tim Lebedkov */ public class IcsParserTest extends TestCase { public IcsParserTest(java.lang.String testName) { super(testName); } public static Test suite() { TestSuite suite = new TestSuite(IcsParserTest.class); return suite; } public void testParsing() throws IOException, ParseException { readIcs("tasklist_1.ics"); readIcs("tasklist_2.ics"); readIcs("tasklist_3.ics"); } private org.netbeans.modules.tasklist.usertasks.ics.parser.Node readIcs(String fn) throws IOException, ParseException { File dir = new File(System.getProperty("xtest.workdir"), "../unit/src/org/netbeans/modules/tasklist/" + "usertasks/ics/"); IcsParser p = new IcsParser(new IcsReader(new InputStreamReader( new FileInputStream( new java.io.File(dir, fn)), "UTF-8" ))); return p.File(); } } |
... 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.