/*
 * Copyright (c) 2004, ADAPT project partners (IST-2001-37126).
 */

package org.eu.adapt.demonstrator.client;

import java.net.URL;

import org.ws_i.www.SampleApplications.SupplyChainManagement._2002_08.LoggingFacility_wsdl.LoggingFacilityLogPortType;
import org.ws_i.www.SampleApplications.SupplyChainManagement._2002_08.LoggingFacility_xsd.LogEventRequestType;
import org.eu.adapt.services.demo_1_1.DemoService_wsdl.DemoServiceLocator;
import org.eu.adapt.tester.latency.LatencyTestSuite;

public class DemoLatencyTestSuite extends LatencyTestSuite
{
    public void setUpTestSuite(String[] args)
        throws Exception
    {
        String             demoServiceURLString = args[0];
        DemoServiceLocator demoServiceLocator   = new DemoServiceLocator();

        _logingFacility = demoServiceLocator.getLogging(new URL(demoServiceURLString));
    }

    public void setUpTest()
        throws Exception
    {
    }

    public void testTest()
        throws Exception
    {
        LogEventRequestType logEventRequestType = new LogEventRequestType();
        logEventRequestType.setDemoUserID("12345");
        logEventRequestType.setEventDescription("12345");
        logEventRequestType.setServiceID("5432112345");
        logEventRequestType.setEventID("1234512345");
             
        _logingFacility.logEvent(logEventRequestType);
    }

    public void tearDownTest()
        throws Exception
    {
    }

    public void tearDownTestSuite()
        throws Exception
    {
        _logingFacility = null;
    }

    private LoggingFacilityLogPortType _logingFacility = null;
}
