BAEL-5001: Fix typo in C3P0 (#10886)
Co-authored-by: Krzysztof Woyke <krzysztof.woyke.sp@lhsystems.com>
This commit is contained in:
		
							parent
							
								
									6da4007dfc
								
							
						
					
					
						commit
						19129f3721
					
				| @ -5,7 +5,7 @@ import java.beans.PropertyVetoException; | |||||||
| import java.sql.Connection; | import java.sql.Connection; | ||||||
| import java.sql.SQLException; | import java.sql.SQLException; | ||||||
| 
 | 
 | ||||||
| public class C3poDataSource { | public class C3p0DataSource { | ||||||
| 
 | 
 | ||||||
|     private static final ComboPooledDataSource cpds = new ComboPooledDataSource(); |     private static final ComboPooledDataSource cpds = new ComboPooledDataSource(); | ||||||
| 
 | 
 | ||||||
| @ -24,5 +24,5 @@ public class C3poDataSource { | |||||||
|         return cpds.getConnection(); |         return cpds.getConnection(); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     private C3poDataSource(){} |     private C3p0DataSource(){} | ||||||
| } | } | ||||||
| @ -0,0 +1,13 @@ | |||||||
|  | package com.baeldung.connectionpool; | ||||||
|  | 
 | ||||||
|  | import java.sql.SQLException; | ||||||
|  | import static org.junit.Assert.assertTrue; | ||||||
|  | import org.junit.Test; | ||||||
|  | 
 | ||||||
|  | public class C3p0DataSourceUnitTest { | ||||||
|  |      | ||||||
|  |     @Test | ||||||
|  |     public void givenC3p0DataSourceClass_whenCallGetConnection_thenCorrect() throws SQLException { | ||||||
|  |         assertTrue(C3p0DataSource.getConnection().isValid(1)); | ||||||
|  |     }    | ||||||
|  | } | ||||||
| @ -1,13 +0,0 @@ | |||||||
| package com.baeldung.connectionpool; |  | ||||||
| 
 |  | ||||||
| import java.sql.SQLException; |  | ||||||
| import static org.junit.Assert.assertTrue; |  | ||||||
| import org.junit.Test; |  | ||||||
| 
 |  | ||||||
| public class C3poDataSourceUnitTest { |  | ||||||
|      |  | ||||||
|     @Test |  | ||||||
|     public void givenC3poDataSourceClass_whenCalledgetConnection_thenCorrect() throws SQLException { |  | ||||||
|         assertTrue(C3poDataSource.getConnection().isValid(1)); |  | ||||||
|     }    |  | ||||||
| } |  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user