package com.infor.auto.sspp.demo;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * Created by bgu on 5/16/2014.
 */
public class TestCase_ReqCreator {
    private ReqCreator creator;
    private static final Log LOG = LogFactory.getLog(TestCase_ReqCreator.class);

    @Before
    public void prepare() {
        creator = new ReqCreator();
        creator.openURL(creator.SSPP_PORTAL_URL);
    }

    @After
    public void clean() {
        creator.quit();
    }

    @Test
    public void testReq() {
        LOG.info("Test create and approve requisition");
        String reqRef;

        creator.login("DHARD", creator.SSPP_TEST_USER_PASSWORD);
        reqRef = creator.createReq();

        creator.login("JCHEN", creator.SSPP_TEST_USER_PASSWORD);
        creator.approveReq(reqRef);
    }
}
