jamesfredley commented on PR #15530:
URL: https://github.com/apache/grails-core/pull/15530#issuecomment-4178776563

   ## Test Coverage Expansion: HibernateProxyHandler7Spec
   
   **File**: 
`grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/proxy/HibernateProxyHandler7Spec.groovy`
   
   Expanded from 5 tests to 21 tests to match the coverage of 
`HibernateProxyHandler5Spec` (20 tests in h5).
   
   ### Original 5 tests (pre-existing)
   
   | # | Test Name |
   |---|---|
   | 1 | test isInitialized for native Hibernate proxy |
   | 2 | test unwrap for a native Hibernate proxy |
   | 3 | test getIdentifier |
   | 4 | test createProxy |
   | 5 | test getAssociationProxy |
   
   ### 16 new tests added
   
   | # | Test Name | Coverage Area |
   |---|---|---|
   | 6 | test isInitialized for a non-proxied object | Non-proxy returns true |
   | 7 | test isInitialized for a Groovy proxy before initialization | Groovy 
proxy returns false when uninitialized |
   | 8 | test unwrap for a Groovy proxy | Groovy proxy unwrap returns target |
   | 9 | test isInitialized for null | Null returns false |
   | 10 | test isInitialized for a persistent collection | Lazy collection 
state detection |
   | 11 | test isInitialized for association name | Association-level 
initialization check |
   | 12 | test isInitialized for association name with null object | Null 
object returns false |
   | 13 | test isProxy | Proxy detection for HibernateProxy, non-proxy, null |
   | 14 | test getProxiedClass | Class extraction from proxy and non-proxy |
   | 15 | test initialize | Force initialization of lazy proxy |
   | 16 | test unwrap for persistent collection | Collection unwrap triggers 
initialization |
   | 17 | test createProxy with AssociationQueryExecutor | 
UnsupportedOperationException |
   | 18 | test createProxy throws IllegalStateException if native interface is 
not GrailsHibernateTemplate | Error path |
   | 19 | test deprecated unwrapProxy and unwrapIfProxy | Backward 
compatibility |
   | 20 | test getAssociationProxy returns null for non-association property | 
Non-association returns null |
   | 21 | test getIdentifier for non-proxy returns null | Non-proxy returns 
null |
   
   ## Test Results
   
   ### HibernateProxyHandler7Spec
   
   ```
   Results: SUCCESS (21 tests, 21 successes, 0 failures, 0 skipped)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to