mirror of https://github.com/sipwise/jitsi.git
parent
929a3c3113
commit
ede3b19533
@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
|
|
||||||
*
|
|
||||||
* Distributable under LGPL license.
|
|
||||||
* See terms of license at gnu.org.
|
|
||||||
*/
|
|
||||||
package net.java.sip.communicator.service.gui;
|
|
||||||
|
|
||||||
import junit.framework.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Runs all PhoneUIService unit tests.
|
|
||||||
*
|
|
||||||
* @author Emil Ivov
|
|
||||||
*/
|
|
||||||
public class TestSuitePhoneUIService
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
public TestSuitePhoneUIService(String s)
|
|
||||||
{
|
|
||||||
super(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
TestSuite suite = new TestSuite();
|
|
||||||
return suite;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
|
|
||||||
*
|
|
||||||
* Distributable under LGPL license.
|
|
||||||
* See terms of license at gnu.org.
|
|
||||||
*/
|
|
||||||
package net.java.sip.communicator.service.protocol;
|
|
||||||
|
|
||||||
import junit.framework.*;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests the call abstract class
|
|
||||||
*
|
|
||||||
* @author Emil Ivov
|
|
||||||
*/
|
|
||||||
public class TestCall extends TestCase
|
|
||||||
{
|
|
||||||
private Call call = null;
|
|
||||||
private String callID = "identifier0123456789";
|
|
||||||
|
|
||||||
// private class DummyCall extends Call
|
|
||||||
// {
|
|
||||||
// public DummyCall()
|
|
||||||
// {
|
|
||||||
// super(callID);
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
// protected void setUp() throws Exception
|
|
||||||
// {
|
|
||||||
// super.setUp();
|
|
||||||
// call = new DummyCall();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
protected void tearDown() throws Exception
|
|
||||||
{
|
|
||||||
call = null;
|
|
||||||
super.tearDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testEquals()
|
|
||||||
{
|
|
||||||
Object obj = null;
|
|
||||||
boolean expectedReturn = false;
|
|
||||||
boolean actualReturn = call.equals(obj);
|
|
||||||
assertEquals("return value", expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
// obj = new DummyCall();
|
|
||||||
// expectedReturn = true;
|
|
||||||
// actualReturn = call.equals(obj);
|
|
||||||
// assertEquals("return value", expectedReturn, actualReturn);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testGetCallID()
|
|
||||||
{
|
|
||||||
String expectedReturn = callID;
|
|
||||||
String actualReturn = call.getCallID();
|
|
||||||
assertEquals("return value", expectedReturn, actualReturn);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
/*
|
|
||||||
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
|
|
||||||
*
|
|
||||||
* Distributable under LGPL license.
|
|
||||||
* See terms of license at gnu.org.
|
|
||||||
*/
|
|
||||||
package net.java.sip.communicator.service.protocol;
|
|
||||||
|
|
||||||
import junit.framework.*;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Emil Ivov
|
|
||||||
*/
|
|
||||||
public class TestCallParticipantState extends TestCase
|
|
||||||
{
|
|
||||||
private CallParticipantState callParticipantState = null;
|
|
||||||
|
|
||||||
protected void setUp() throws Exception
|
|
||||||
{
|
|
||||||
super.setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void tearDown() throws Exception
|
|
||||||
{
|
|
||||||
super.tearDown();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testGetStateString()
|
|
||||||
{
|
|
||||||
String expectedReturn = CallParticipantState._BUSY;
|
|
||||||
String actualReturn = CallParticipantState.BUSY.getStateString();
|
|
||||||
|
|
||||||
assertEquals("the BUSY state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._INCOMING_CALL;
|
|
||||||
actualReturn = CallParticipantState.INCOMING_CALL.getStateString();
|
|
||||||
assertEquals("the CALLING state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._UNKNOWN;
|
|
||||||
actualReturn = CallParticipantState.UNKNOWN.getStateString();
|
|
||||||
assertEquals("the UNKNOWN state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._CONNECTED;
|
|
||||||
actualReturn = CallParticipantState.CONNECTED.getStateString();
|
|
||||||
assertEquals("the CONNECTED state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._CONNECTING;
|
|
||||||
actualReturn = CallParticipantState.CONNECTING.getStateString();
|
|
||||||
assertEquals("the CONNECTING state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._DISCONNECTED;
|
|
||||||
actualReturn = CallParticipantState.DISCONNECTED.getStateString();
|
|
||||||
assertEquals("the DISCONNECTED state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._FAILED;
|
|
||||||
actualReturn = CallParticipantState.FAILED.getStateString();
|
|
||||||
assertEquals("the FAILED state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._ALERTING_REMOTE_SIDE;
|
|
||||||
actualReturn = CallParticipantState.ALERTING_REMOTE_SIDE.getStateString();
|
|
||||||
assertEquals("the RINGING state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
expectedReturn = CallParticipantState._ON_HOLD;
|
|
||||||
actualReturn = CallParticipantState.ON_HOLD.getStateString();
|
|
||||||
assertEquals("the ON_HOLD state has an invalid string repr."
|
|
||||||
,expectedReturn, actualReturn);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in new issue