    1   package baseCode.dataFilter;
    2
    3   import baseCode.dataFilter.ItemLevelFilter;
    4   import baseCode.dataStructure.matrix.DenseDoubleMatrix2DNamed;
    5
    6   /***
    7    *
    8    *
    9    * <hr>
    10   * <p>
    11   * Copyright (c) 2004 Columbia University
    12   *
    13   * @author pavlidis
    14   * @version $Id: TestItemLevelFilter.java,v 1.1 2005/03/17 13:58:41 pavlidis Exp $
    15   */
    16  public class TestItemLevelFilter extends AbstractTestFilter {
    17
    18     ItemLevelFilter f = null;
    19
    20     /*
    21      * @see TestCase#setUp()
    22      */
    23     protected void setUp() throws Exception {
    24        super.setUp();
    25        f = new ItemLevelFilter();
    26     }
    27
    28     /*
    29      * @see TestCase#tearDown()
    30      */
    31     protected void tearDown() throws Exception {
    32        super.tearDown();
    33
    34     }
    35
    36     public final void testFilter() {
    37        f.setLowCut( 0.0 );
    38        DenseDoubleMatrix2DNamed result = ( DenseDoubleMatrix2DNamed ) f
    39              .filter( testdata );
    40        int expectedReturn = 283;
    41        int actualReturn = result.size() - result.numMissing();
    42        assertEquals( "return value", expectedReturn, actualReturn );
    43     }
    44
    45  }