Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

Author(s):
M. Ranganathan
public abstract class AbstractRedirectTestCase extends ScenarioHarness implements
        SipListener {
    protected Shootist shootist;
    protected Shootme shootme;
    private static Logger logger = Logger.getLogger("test.tck");
    static {
        if (!.isAttached()) {
            .addAppender();
        }
    }
    // private Appender appender;
    public AbstractRedirectTestCase() {
        super("redirect"true);
    }
    public void setUp() {
        try {
            super.setUp();
            .info("RedirectTest: setup()");
             = new Shootist(getTiProtocolObjects());
            SipProvider shootistProvider = .createProvider();
            .put(shootistProvider);
             = new Shootme(getRiProtocolObjects());
            SipProvider shootmeProvider = .createProvider();
            .put(shootmeProvider);
            shootistProvider.addSipListener(this);
            shootmeProvider.addSipListener(this);
            if (getTiProtocolObjects() != getRiProtocolObjects())
                getTiProtocolObjects().start();
            getRiProtocolObjects().start();
        } catch (Exception ex) {
            .error("unexpected excecption "ex);
            fail("unexpected exception");
        }
    }
    public void tearDown() {
        try {
            Thread.sleep(4000);
            this..checkState();
            this..checkState();
            super.tearDown();
            Thread.sleep(1000);
            this..clear();
            logTestCompleted();
        } catch (Exception ex) {
            .error("unexpected exception"ex);
            fail("unexpected exception ");
        }
    }
New to GrepCode? Check out our FAQ X