BAEL-5001: Fix typo in C3P0 (#10886)

Co-authored-by: Krzysztof Woyke <krzysztof.woyke.sp@lhsystems.com>
This commit is contained in:
kwoyke 2021-06-16 12:38:07 +02:00 committed by GitHub
parent 6da4007dfc
commit 19129f3721
3 changed files with 15 additions and 15 deletions

View File

@ -5,7 +5,7 @@ import java.beans.PropertyVetoException;
import java.sql.Connection;
import java.sql.SQLException;
public class C3poDataSource {
public class C3p0DataSource {
private static final ComboPooledDataSource cpds = new ComboPooledDataSource();
@ -24,5 +24,5 @@ public class C3poDataSource {
return cpds.getConnection();
}
private C3poDataSource(){}
private C3p0DataSource(){}
}

View File

@ -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));
}
}

View File

@ -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));
}
}