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

Hello!

Sorry for delay.
I have checked your update and committed it into a master branch.
Good work.

I have some remarks and also a have made some update to your code to fit our coding style. My reemarks are below.

1. PDPContextDataImpl:
if (this.pdpType == null) {
                        System.out.println(" this.pdpType " + this.pdpType  );
throw new MAPParsingComponentException("Error while decoding " + _PrimitiveName + ": A mandatory parameter pdpType has not found",
                                        
MAPParsingComponentExceptionReason.MistypedParameter);
}
Why do we need "System.out.println()"? I removed this

2. Tests: lets use MAPExtensionContainerTest.CheckTestExtensionContainer() and GetTestExtensionContainer() for testing MAPExtensionContainer parameters.
This lets us to reuse a code. You use:
assertNotNull(extensionContainer);
MAPExtensionContainer extensionContainer = getMapExtensionContainer();          
It is better to test:
assertTrue(MAPExtensionContainerTest.CheckTestExtensionContainer(extensionContainer));
MAPExtensionContainer extensionContainer = MAPExtensionContainerTest.GetTestExtensionContainer();

3. Tests: if primitives a rather simple let's use a more clear way of them creation / testing. For example the following looks more clear:
assertEquals((int) prim.getPreferentialCugIndicator(), 1);
assertEquals(prim.getInterCugRestrictions().getInterCUGRestrictionsValue(), InterCUGRestrictionsValue.CUGOnlyFacilities); InterCUGRestrictions interCugRestrictions = new InterCUGRestrictionsImpl(InterCUGRestrictionsValue.CUGOnlyFacilities);
IntraCUGOptions intraCugOptions = IntraCUGOptions.noCUGRestrictions;

than:
assertTrue(prim.getPreferentialCugIndicator().equals(new Integer(1)));
assertTrue(prim.getInterCugRestrictions().getInterCUGRestrictionsValue().equals(InterCUGRestrictionsValue.CUGOnlyFacilities));
InterCUGRestrictions interCugRestrictions = new InterCUGRestrictionsImpl(0);
IntraCUGOptions intraCugOptions = IntraCUGOptions.getInstance(0);

I have updated CUGFeatureTest, please look at my update

4. Do you have any live trace data for ISDNSubaddressString. We need to implement an internal structure of this primitive.




Reply via email to