Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. spring bean override issue caused uconn's ojb-ar.xml is not being loaded.

   The issue is overridden following bean. This bean is also overriden overridden in AR's spring-test-env-beans.xml. Based on the order of spring files loading, 'spring-test-env-beans.xml' is loaded last. Therefore, it will use bean from 'spring-test-env-beans.xml'.  There are a couple of potential solutions.  Since Uconn is not using the unit test from Foundation, so removed 'spring-test-env-beans.xml' i from spring.properties after discussion with dev team.

     <bean id="arModuleConfiguration" parent="arModuleConfiguration-parentBean">  

...

If we use the schemaLocation with DEV url and not running Tomcat locally, this then unit test is going to fail, because
it because it won't be able to find the schema, such as electronicInvoicecustomer.xsd, unless Tomcat is running locally.
Therefore, for unit test purpose, let's It is set the schemaLocation to kfs-uat url. Please see 'CustomerLoadServiceImplTest' for example.

'kfs-uat' is using "https", then there is SSL cert issue needs to be resolved. You may see following exception :

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

You can google this exception to find resolution.  Following is the one I used to resolve this exception:

http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/

 

3. If you are going to test a protected method, which is not declared in 'service' interface,  in 'impl' class, then you can get bean like following to use "TestUtils.getUnproxiedService" : 

   pdpExtractService = (PdpExtractServiceImpl)TestUtils.getUnproxiedService("pdpExtractService");

 

  Then test method 'updatePaymentRequest' which is a protected method in 'impl' class like following:

   pdpExtractService.updatePaymentRequest(paymentRequestDocument, puser, new Date());

 

  This example is in 'PdpExtractServiceImplTest'.