javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/BufferedReaderTests.java
changeset 76 4ad59aaee882
parent 21 2a9601315dfc
child 83 26b2b12093af
equal deleted inserted replaced
69:773449708c84 76:4ad59aaee882
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 package com.nokia.mj.impl.utils;
    19 package com.nokia.mj.impl.utils;
    20 
    20 
    21 import com.nokia.mj.impl.installer.utils.InstallerMain;
    21 import com.nokia.mj.impl.rt.test.UnitTestSuiteCreator;
    22 import com.nokia.mj.impl.utils.BufferedReader;
    22 import com.nokia.mj.impl.utils.BufferedReader;
    23 
    23 
    24 import java.io.ByteArrayInputStream;
    24 import java.io.ByteArrayInputStream;
    25 import java.io.InputStreamReader;
    25 import java.io.InputStreamReader;
    26 import java.io.IOException;
    26 import java.io.IOException;
    31 import j2meunit.framework.TestSuite;
    31 import j2meunit.framework.TestSuite;
    32 
    32 
    33 /**
    33 /**
    34  * BufferedReader unit tests.
    34  * BufferedReader unit tests.
    35  */
    35  */
    36 public class BufferedReaderTests extends TestCase implements InstallerMain
    36 public class BufferedReaderTests extends TestCase implements UnitTestSuiteCreator
    37 {
    37 {
    38 
    38 
    39     private static final String TEST_DATA = "one\ntwo\nthree";
    39     private static final String TEST_DATA = "one\ntwo\nthree";
    40     private static final int MAX_BUF_SIZE = 16;
    40     private static final int MAX_BUF_SIZE = 16;
    41 
    41 
    42     // Begin j2meunit test framework setup
    42     // Begin j2meunit test framework setup
    43     public void installerMain(String[] args)
    43     public TestSuite createTestSuite(String[] args)
    44     {
    44     {
    45         TestSuite suite = new TestSuite(this.getClass().getName());
    45         TestSuite suite = new TestSuite(this.getClass().getName());
    46 
    46 
    47         suite.addTest(new BufferedReaderTests("testMark", new TestMethod()
    47         suite.addTest(new BufferedReaderTests("testMark", new TestMethod()
    48         {
    48         {
    78             {
    78             {
    79                 ((BufferedReaderTests)tc).testSkip();
    79                 ((BufferedReaderTests)tc).testSkip();
    80             }
    80             }
    81         }));
    81         }));
    82 
    82 
    83         com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
    83         return suite;
    84     }
    84     }
    85 
    85 
    86     public BufferedReaderTests()
    86     public BufferedReaderTests()
    87     {
    87     {
    88     }
    88     }