Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package test.unit.gov.nist.javax.sip.stack.forkedinvite482;
  
  
 
 
 
 import  test.tck.msgflow.callflows.ProtocolObjects;
 import  test.tck.msgflow.callflows.ScenarioHarness;
 
 import  junit.framework.TestCase;

Author(s):
M. Ranganathan
 
 public class AbstractForkedInviteTestCase extends ScenarioHarness implements
         SipListener {
 
 
     protected Shootist shootist;
 
     private static Logger logger = Logger.getLogger("test.tck");
 
 
     protected Shootme shootme;
 
     private Proxy proxy;
 
 
 
     static {
         if ( !.isAttached(console))
             .addAppender(console);
     }
 
     // private Appender appender;
 
     public AbstractForkedInviteTestCase() {
 
         super("forkedInviteTest"true);
 
         try {
             providerTable = 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();
             providerTable.put(shootistProvider);
 
             this. = new Shootme(5080, getTiProtocolObjects());
             SipProvider shootmeProvider = .createProvider();
             providerTable.put(shootmeProvider);
             shootistProvider.addSipListener(this);
             shootmeProvider.addSipListener(this);
 
 
             this. = new Proxy(5070, getRiProtocolObjects());
             SipProvider provider = .createSipProvider();
             provider.setAutomaticDialogSupportEnabled(false);
             providerTable.put(provider);
             provider.addSipListener(this);
 
             getTiProtocolObjects().start();
             if (getTiProtocolObjects() != getRiProtocolObjects())
                 getRiProtocolObjects().start();
         } catch (Exception ex) {
             fail("unexpected exception ");
        }
    }
    public void tearDown() {
        try {
            Thread.sleep(4000);
            this..checkState();
            this..checkState();
            this..checkState();
            getTiProtocolObjects().destroy();
            if (getRiProtocolObjects() != getTiProtocolObjects())
                getRiProtocolObjects().destroy();
            Thread.sleep(2000);
            this..clear();
            super.logTestCompleted();
        } catch (Exception ex) {
            .error("unexpected exception"ex);
            fail("unexpected exception ");
        }
    }
New to GrepCode? Check out our FAQ X