FileInfoTest.java :  » Content-Management-System » TransferCM » com » methodhead » shim » Java Open Source

Java Open Source » Content Management System » TransferCM 
TransferCM » com » methodhead » shim » FileInfoTest.java
/* 
 * Copyright (C) 2006 Methodhead Software LLC.  All rights reserved.
 * 
 * This file is part of TransferCM.
 * 
 * TransferCM is free software; you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 * 
 * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
 * Fifth Floor, Boston, MA  02110-1301  USA
 */

package com.methodhead.shim;

import java.util.*;
import java.sql.*;
import junit.framework.*;
import org.apache.log4j.*;
import com.methodhead.persistable.*;
import com.methodhead.test.*;

public class FileInfoTest extends TestCase {

  private FileInfo thumb = null;

  static {
    TestUtils.initLogger();
  }

  public FileInfoTest( String name ) {
    super( name );
  }

  protected void setUp() {
    try {
    }
    catch ( Exception e ) {
      fail( e.getMessage() );
    }
  }

  protected void tearDown() {
  }

  public void testProperties() {
    try {
      thumb = new FileInfo();

      thumb.setName( "testName" );
      assertEquals( "testName", thumb.getName() );

      thumb.setPath( "testPath" );
      assertEquals( "testPath", thumb.getPath() );

      thumb.setSize( 666 );
      assertEquals( 666, thumb.getSize() );

      thumb.setIconHint( "DIR" );
      assertEquals( "DIR", thumb.getIconHint() );
    }
    catch ( Exception e ) {
      e.printStackTrace();
      fail();
    }
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.