Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package test.tck.msgflow.callflows.recroute;
 
 
 
 

Author(s):
M. Ranganathan
Jeroen van Bemmel
public class AbstractRecRouteTestCase extends ScenarioHarness implements
        SipListener {
    protected Shootist shootist;
    private static Logger logger = Logger.getLogger("test.tck");
    protected Shootme shootme;
    private Proxy proxy;
    static {
        if ( !.isAttached())
            .addAppender();
    }
    // private Appender appender;
    public AbstractRecRouteTestCase() {
        super("TCPRecRouteTest"true);
        try {
             = new Hashtable();
        } catch (Exception ex) {
            .error("unexpected exception"ex);
            fail("unexpected exception ");
        }
    }
    public void setUp() {
        try {
            super.setUp(false);
             = new Shootist(5060, 5070, getTiProtocolObjects());
            SipProvider shootistProvider = .createSipProvider();
            .put(shootistProvider);
            shootistProvider.addSipListener(this);
            this. = new Shootme(5080, getTiProtocolObjects());
            SipProvider shootmeProvider = .createProvider();
            .put(shootmeProvider);
            shootmeProvider.addSipListener(this);
            this. = new Proxy(5070, getRiProtocolObjects());
            SipProvider provider = .createSipProvider();
            //provider.setAutomaticDialogSupportEnabled(false);
            .put(provider);
            provider.addSipListener(this);
            getTiProtocolObjects().start();
            if (getTiProtocolObjects() != getRiProtocolObjects())
                getRiProtocolObjects().start();
        } catch (Exception ex) {
            .error("Unexpected exception",ex);
            fail("unexpected exception ");
        }
    }
    public void tearDown() {
        try {
            Thread.sleep(5000);
            this..checkState();
            this..checkState();
            this..checkState();
            super.tearDown();
            Thread.sleep(4000);
            this..clear();
            super.logTestCompleted();
        } catch (Exception ex) {
            .error("unexpected exception"ex);
            fail("unexpected exception ");
        }
    }
New to GrepCode? Check out our FAQ X