/**
* Start time:14:11:03 2009-04-23<br>
* Project: mobicents-isup-stack<br>
*
* @author <a href="mailto:baranowb@gmail.com">Bartosz Baranowski
* </a>
*
*/
package org.mobicents.ss7.isup.impl.message.parameter;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import org.mobicents.ss7.isup.ISUPComponent;
import org.mobicents.ss7.isup.impl.message.parameter.CalledDirectoryNumberImpl;
import org.mobicents.ss7.isup.impl.message.parameter.CalledINNumberImpl;
import org.mobicents.ss7.isup.impl.message.parameter.CorrelationIDImpl;
/**
* Start time:14:11:03 2009-04-23<br>
* Project: mobicents-isup-stack<br>
*
* @author <a href="mailto:baranowb@gmail.com">Bartosz Baranowski
* </a>
*/
public class CorrelationIDTest extends ParameterHarness {
/**
* @throws IOException
*/
public CorrelationIDTest() throws IOException {
//super.badBodies.add(new byte[1]);
//FIXME: add test here, Q.1218 does not show how this is encoded.
//super.goodBodies.add(getBody1());
//super.goodBodies.add(getBody2());
}
private byte[] getBody1() throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
// we will use odd number of digits, so we leave zero as MSB
bos.write(super.getSixDigits());
return bos.toByteArray();
}
private byte[] getBody2() throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
bos.write(super.getFiveDigits());
return bos.toByteArray();
}
public void testBody1EncodedValues() throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, IOException {
//CorrelationID bci = new CorrelationID(getBody1());
//String[] methodNames = { "getNumberingPlanIndicator"};
//Object[] expectedValues = { CorrelationID._NPI_ISDN };
//super.testValues(bci, methodNames, expectedValues);
}
/*
* (non-Javadoc)
*
* @see
* org.mobicents.isup.messages.parameters.ParameterHarness#getTestedComponent
* ()
*/
@Override
public ISUPComponent getTestedComponent() {
return new CorrelationIDImpl(1,1,new int[2]);
}
}