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.service.UserService;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value="classpath:application-context.xml")
public class UserServiceImplTest {

	@Autowired
	private UserService userService;
	
	@Test
	public void testBindDevice() {
		JsonResult<?> jsonResult = userService.bindDevice(200, "5ccf7f0065ca");
		System.out.println(jsonResult.toString());
	}

	@Test
	public void testShareDevice() {
		JsonResult<?> jsonResult = userService.shareDevice(200, 1);
		System.out.println(jsonResult.toString());
	}

}
