Advertisement
mugs

KFS service override

Jul 2nd, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.24 KB | None | 0 0
  1. diff --git a/web/src/main/java/za/org/kuali/kfs/sec/businessobject/lookup/AccessSecurityAccountLookupableHelperServiceImpl.java b/web/src/main/java/za/org/kuali/kfs/sec/businessobject/lookup/AccessSecurityAccountLookupableHelperServiceImpl.java
  2. new file mode 100644
  3. index 0000000..a49fd5d
  4. --- /dev/null
  5. +++ b/web/src/main/java/za/org/kuali/kfs/sec/businessobject/lookup/AccessSecurityAccountLookupableHelperServiceImpl.java
  6. @@ -0,0 +1,18 @@
  7. +/**
  8. + *
  9. + */
  10. +package za.org.kuali.kfs.sec.businessobject.lookup;
  11. +
  12. +/**
  13. + * @author mugo
  14. + *
  15. + */
  16. +public class AccessSecurityAccountLookupableHelperServiceImpl extends
  17. +org.kuali.kfs.sec.businessobject.lookup.AccessSecurityAccountLookupableHelperServiceImpl {
  18. +
  19. +   /**
  20. +    *
  21. +    */
  22. +   private static final long serialVersionUID = -4767728909430071138L;
  23. +
  24. +}
  25. diff --git a/web/src/main/resources/za/org/kuali/kfs/sec/spring-sec.xml b/web/src/main/resources/za/org/kuali/kfs/sec/spring-sec.xml
  26. index a8c720a..b8b159e 100644
  27. --- a/web/src/main/resources/za/org/kuali/kfs/sec/spring-sec.xml
  28. +++ b/web/src/main/resources/za/org/kuali/kfs/sec/spring-sec.xml
  29. @@ -77,5 +77,8 @@
  30.          <property name="title" value="Security Model Load Report" />
  31.          <property name="aggregationModeOn" value="false"/>
  32.      </bean>
  33. +    
  34. +    <bean id="securityAccountLookupableHelperService" parent="securityAccountLookupableHelperService-parentBean"
  35. +       scope="prototype" class="za.org.kuali.kfs.sec.businessobject.lookup.AccessSecurityAccountLookupableHelperServiceImpl" />
  36.  
  37.  </beans>
  38. diff --git a/web/src/test/java/za/org/kuali/kfs/sec/businessobject/lookup/AccessSecurityAccountLookupableHelperServiceImplIntegrationTest.java b/web/src/test/java/za/org/kuali/kfs/sec/businessobject/lookup/AccessSecurityAccountLookupableHelperServiceImplIntegrationTest.java
  39. new file mode 100644
  40. index 0000000..ccc074b
  41. --- /dev/null
  42. +++ b/web/src/test/java/za/org/kuali/kfs/sec/businessobject/lookup/AccessSecurityAccountLookupableHelperServiceImplIntegrationTest.java
  43. @@ -0,0 +1,39 @@
  44. +/**
  45. + *
  46. + */
  47. +package za.org.kuali.kfs.sec.businessobject.lookup;
  48. +
  49. +import org.junit.experimental.categories.Category;
  50. +import org.kuali.kfs.sys.ConfigureContext;
  51. +import org.kuali.kfs.sys.context.KualiTestBase;
  52. +import org.kuali.kfs.sys.context.SpringContext;
  53. +
  54. +import za.org.kuali.kfs.UnitIntegrationTests;
  55. +
  56. +/**
  57. + * tests {@link org.kuali.kfs.sec.businessobject.lookup.AccessSecurityAccountLookupableHelperServiceImpl}
  58. + * @author mugo
  59. + *
  60. + */
  61. +@ConfigureContext
  62. +@Category(UnitIntegrationTests.class)
  63. +public class AccessSecurityAccountLookupableHelperServiceImplIntegrationTest extends KualiTestBase {
  64. +
  65. +   private Object secSvc;
  66. +   public void setUp() {
  67. +       secSvc = SpringContext.getService("securityAccountLookupableHelperService");
  68. +   }
  69. +  
  70. +   public void testSpringOverride_class_comparison() {
  71. +       assertEquals("class differs", AccessSecurityAccountLookupableHelperServiceImpl.class, secSvc.getClass());
  72. +   }
  73. +  
  74. +   public void testSpringOverride_instanceof() {
  75. +       assertTrue("class differs", secSvc instanceof AccessSecurityAccountLookupableHelperServiceImpl);
  76. +   }
  77. +  
  78. +   public void testSpringOverride_cast() {
  79. +       AccessSecurityAccountLookupableHelperServiceImpl svc = (AccessSecurityAccountLookupableHelperServiceImpl)secSvc;
  80. +   }
  81. +
  82. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement