package com.ifish.serviceImpl;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.ifish.dto.JsonResult;
import com.ifish.dto.PageingDto;
import com.ifish.service.InformationService;
import com.ifish.validator.PageParam;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value="classpath*:/application-context.xml")
public class InformationServiceImplTest {
	
	@Autowired
	private InformationService informationService;
	
	@Test
	public void testGetInformationsByPage() {
		PageParam pageParam = new PageParam(100,0,10);
		PageingDto<?> page = informationService.getInformationsByPage(pageParam);
		System.out.println(page);
	}

	@Test
	public void testAddClickNum() {
		JsonResult<?> result = informationService.addClickNum(12);
		System.out.println(result);
	}

}
