package org.jerrymouse.cc.site.store.ftp;

import static org.junit.Assert.*;

import java.io.InputStream;

import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jerrymouse.cc.site.store.ftp.FtpStoreConfig;
import org.jerrymouse.cc.site.store.ftp.FtpStoreManager;
import org.jerrymouse.cc.site.test.BaseTest;
import org.junit.Before;
import org.junit.Test;

public class FtpStoreManagerTest extends BaseTest {

	FtpStoreManager ftpStoreManager;

	private Log log = LogFactory.getLog(getClass());

	@Override
	@Before
	protected void onSetUp() throws Exception {
		super.onSetUp();
		FtpStoreConfig config = new FtpStoreConfig();
		config.setHost("localhost");
		config.setUsername("kaiyannju");
		config.setPassword("1248163264");
		config.setPath("/cc");
		ftpStoreManager = new FtpStoreManager();
		ftpStoreManager.setFtpFileConfig(config);
	}

	@Test
	public void testGetBytes() throws Exception {
	//	byte[] bytes = ftpStoreManager.getBytes("a.txt");
	//	log.debug(bytes);
	}

	@Test
	public void testGetInputStream() throws Exception {
	//	InputStream inputStream = ftpStoreManager.getInputStream("a.txt");
	//	String s = IOUtils.toString(inputStream);
	//	log.debug(s);
	}
}
