Comment #8 on issue 152 by [email protected]: Implement insertSubscriberData MAP message
http://code.google.com/p/jss7/issues/detail?id=152

Hello!

I have several remarks for your update:

1. MCSI:
we should use
public long getServiceKey();
instead of
public Long getServiceKey();
because ServiceKey parameter is mandatory and can not be null

2. MMCodeValue:
You have updated values so for example RouteingAreaUpdateToOtherSGSNUpdateFromNewSGSN was 128+1==129 and it is now -128+1==127. May be it is better to keep old values (to be all positives) and when decoding in MMCodeImpl.getMMCodeValue() use something like
return MMCodeValue.getInstance(data | 0xFF)
to garantee a positive value?
It is not a bug, but from my point of view code will look better.

3. A very important issue:
we can test like this
assertEquals(a, b);
when a and b are digits (like int, Integer, long, Long and so on) and enums.
We can not use this for Strings, arrays or complex classes.
So this:
assertEquals(forwardedToNumber.getAddress(),"22228"); (from ExtSSInfoTest)
only if Strings (arrays, objects) are the same instantces. If Strings a and b are two different instances with the same context (string) the result will be false.
So we should use:
int a, b;
assertEquals(a, b);
enum a, b;
assertEquals(a, b);
String a, b;
assertTrue(a.equals(b));
byte[] a,b;
assertTrue(Arrays.equals(a, b));

Can you please revise all tests and fix this?

to be continued



Reply via email to