package org.jerrymouse.cc.site.bean;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jerrymouse.cc.site.bean.Resource;
import org.jerrymouse.cc.site.bean.Storage;
import org.jerrymouse.cc.site.bean.User;
import org.jerrymouse.cc.site.database.UserDao;
import org.jerrymouse.cc.site.test.BaseTest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

public class StorageTest extends BaseTest {
	@Autowired
	UserDao userDao;

	Storage storage;

	private static Log log = LogFactory.getLog(StorageTest.class);

	@Override
	protected void onSetUp() throws Exception {
		User user = userDao.getUserByName("yankai");
		storage = user.getStorage();
		super.onSetUp();
	}

	@Test
	public void testList() throws Exception {
		List<Resource> resources = storage.getResources();
		log.debug(resources);

	}
}
