package com.cesgroup.cesmonitor.test;

import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;

import com.cesgroup.cesmonitor.service.IdentityService;
import com.cesgroup.cesmonitor.service.LoginUser;

@ContextConfiguration(locations = {
    "classpath:/spring/applicationContext.xml",
})

public class MyTest extends AbstractJUnit4SpringContextTests {

    protected Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    protected IdentityService identityService;

    @Before
    public void login() {
        try {
            /**
             *
             * { "id": "6b924ed88a984827aa14c6ed3f99c32d",
             * "name": "dangan-project",
             *
             * },
             * {
             * "id": "bd8736c7605e45359123544f5b7bd571",
             * "name": "demo",
             * }
             */
            LoginUser user = identityService.login("Admin", "zabbix");//admin
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Test
    public void testRunnableMethod(){
        //No runnable method

    }

}
