Commit ae0bc90d6f813a6a934eb5b826619f93e0f764bd
1 parent
c410689e
Exists in
master
Remoção de classes desnecessárias
Showing
4 changed files
with
0 additions
and
98 deletions
Show diff stats
impl/extension/jdbc/src/test/java/connection/producer/ConnectionProducerDefaultTestWithName.java
| @@ -1,50 +0,0 @@ | @@ -1,50 +0,0 @@ | ||
| 1 | -package connection.producer; | ||
| 2 | - | ||
| 3 | -import static org.junit.Assert.assertEquals; | ||
| 4 | -import static org.junit.Assert.assertNotNull; | ||
| 5 | -import static org.junit.Assert.fail; | ||
| 6 | - | ||
| 7 | -import java.sql.Connection; | ||
| 8 | -import java.sql.SQLException; | ||
| 9 | - | ||
| 10 | -import javax.inject.Inject; | ||
| 11 | - | ||
| 12 | -import org.jboss.arquillian.container.test.api.Deployment; | ||
| 13 | -import org.jboss.arquillian.junit.Arquillian; | ||
| 14 | -import org.jboss.shrinkwrap.api.spec.WebArchive; | ||
| 15 | -import org.junit.Test; | ||
| 16 | -import org.junit.runner.RunWith; | ||
| 17 | - | ||
| 18 | -import test.Tests; | ||
| 19 | -import br.gov.frameworkdemoiselle.internal.configuration.JDBCConfig; | ||
| 20 | - | ||
| 21 | -@RunWith(Arquillian.class) | ||
| 22 | -public class ConnectionProducerDefaultTestWithName { | ||
| 23 | - | ||
| 24 | - @Inject | ||
| 25 | - private JDBCConfig config; | ||
| 26 | - | ||
| 27 | - private static String PATH = "src/test/resources/producer"; | ||
| 28 | - | ||
| 29 | - @Inject | ||
| 30 | - private Connection connection; | ||
| 31 | - | ||
| 32 | - @Deployment | ||
| 33 | - public static WebArchive createDeployment() { | ||
| 34 | - WebArchive deployment = Tests.createDeployment(ConnectionProducerDefaultTestWithName.class); | ||
| 35 | - deployment.addAsResource(Tests.createFileAsset(PATH + "/default-producer-with-name.properties"), "default-producer-with-name.properties"); | ||
| 36 | - return deployment; | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - @Test | ||
| 40 | - public void createDefaultConnectionWithoutName(){ | ||
| 41 | - try { | ||
| 42 | - assertNotNull(connection); | ||
| 43 | - //verificar se retorna realmente o nome da conexão | ||
| 44 | - assertEquals(connection.getCatalog(), config.getDefaultDataSourceName()); | ||
| 45 | - } catch (SQLException e) { | ||
| 46 | - e.printStackTrace(); | ||
| 47 | - fail(); | ||
| 48 | - } | ||
| 49 | - } | ||
| 50 | -} |
impl/extension/jdbc/src/test/java/connection/producer/ConnectionProducerDefaultTestWithoutName.java
| @@ -1,39 +0,0 @@ | @@ -1,39 +0,0 @@ | ||
| 1 | -package connection.producer; | ||
| 2 | - | ||
| 3 | -import static org.junit.Assert.assertNotNull; | ||
| 4 | -import static org.junit.Assert.fail; | ||
| 5 | - | ||
| 6 | -import java.sql.Connection; | ||
| 7 | -import java.sql.SQLException; | ||
| 8 | - | ||
| 9 | -import javax.inject.Inject; | ||
| 10 | - | ||
| 11 | -import org.junit.Test; | ||
| 12 | - | ||
| 13 | -import br.gov.frameworkdemoiselle.internal.configuration.JDBCConfig; | ||
| 14 | - | ||
| 15 | - | ||
| 16 | -public class ConnectionProducerDefaultTestWithoutName { | ||
| 17 | - | ||
| 18 | - @Inject | ||
| 19 | - private JDBCConfig config; | ||
| 20 | - | ||
| 21 | - private String PATH = "src/test/resources/producer"; | ||
| 22 | - | ||
| 23 | - @Inject | ||
| 24 | - private Connection connection; | ||
| 25 | - | ||
| 26 | - @Test | ||
| 27 | - public void createDefaultConnectionWithoutName(){ | ||
| 28 | - //utilizar o arquivo de propriedade sem o name | ||
| 29 | - try { | ||
| 30 | - assertNotNull(connection); | ||
| 31 | - //verificar se retorna realmente o nome da conexão | ||
| 32 | - assertNotNull(connection.getCatalog()); | ||
| 33 | - } catch (SQLException e) { | ||
| 34 | - // TODO Auto-generated catch block | ||
| 35 | - e.printStackTrace(); | ||
| 36 | - fail(); | ||
| 37 | - } | ||
| 38 | - } | ||
| 39 | -} |
impl/extension/jdbc/src/test/resources/producer/default-producer-with-name.properties
| @@ -1,5 +0,0 @@ | @@ -1,5 +0,0 @@ | ||
| 1 | -frameworkdemoiselle.persistence.driver.class=org.h2.jdbcx.JdbcDataSource | ||
| 2 | -frameworkdemoiselle.persistence.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 | ||
| 3 | -frameworkdemoiselle.persistence.username=sa | ||
| 4 | -frameworkdemoiselle.persistence.password=sa | ||
| 5 | -frameworkdemoiselle.persistence.default.datasource.name=databasename | ||
| 6 | \ No newline at end of file | 0 | \ No newline at end of file |
impl/extension/jdbc/src/test/resources/producer/default-producer-without-name.properties
| @@ -1,4 +0,0 @@ | @@ -1,4 +0,0 @@ | ||
| 1 | -frameworkdemoiselle.persistence.driver.class=org.h2.jdbcx.JdbcDataSource | ||
| 2 | -frameworkdemoiselle.persistence.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 | ||
| 3 | -frameworkdemoiselle.persistence.username=sa | ||
| 4 | -frameworkdemoiselle.persistence.password=sa | ||
| 5 | \ No newline at end of file | 0 | \ No newline at end of file |