Package net.sourceforge.jtds.jdbc

Examples of net.sourceforge.jtds.jdbc.Driver


    @Before
    public void setup() throws Exception
    {
        new CreateDatabase(URL, USERNAME, PASSWORD).execute();

        DataSource dataSource = new SimpleDriverDataSource(new Driver(), URL, USERNAME, PASSWORD);
        migrationManager = new DataSourceMigrationManager(dataSource);
        migrationManager.setMigrationResolver(new ResourceMigrationResolver("classpath:/test_migrations/sqlserver_2000/"));

        jdbcTemplate = new SimpleJdbcTemplate(dataSource);
    }
View Full Code Here


                            try {
                                boolean found = false;
                                String messageKey = Messages.get(key);

                                DriverPropertyInfo[] infoArray = new Driver().getPropertyInfo(url, properties);
                                for (int i = 0; i < infoArray.length; i++) {
                                    DriverPropertyInfo info = infoArray[i];
                                    if (info.name.equals(messageKey)) {
                                        assertEquals(message, expected, info.value);
                                        found = true;
View Full Code Here

     * {@link Driver#getPropertyInfo(String, Properties)}
     * causes the url to be parsed, which then throws a {@link SQLException}.
     */
    public void test_getPropertyInfo_ThrowsSQLExceptionWithNullProperties() {
        try {
            new Driver().getPropertyInfo("wxyz:", null);
            fail("Expected SQLException to be throw");
        }
        catch (SQLException e) {
            // Expected
        }
View Full Code Here

     * {@link Driver#getPropertyInfo(String, Properties)}
     * causes the url to be parsed, which then throws a {@link SQLException}.
     */
    public void test_getPropertyInfo_ThrowsSQLExceptionWithNonNullProperties() {
        try {
            new Driver().getPropertyInfo("wxyz:", new Properties());
            fail("Expected SQLException to be throw");
        }
        catch (SQLException e) {
            // Expected
        }
View Full Code Here

     *
     * @param driverPropertyInfoMap The map of {@link DriverPropertyInfo} objects to be populated.
     */
    private void loadDriverPropertyInfoMap(final Map driverPropertyInfoMap) {
        try {
            final DriverPropertyInfo[] driverPropertyInfoArray = new Driver().getPropertyInfo(
                                "jdbc:jtds:sqlserver://servername/databasename", new Properties());
            for (int i = 0; i < driverPropertyInfoArray.length; i++) {
                DriverPropertyInfo driverPropertyInfo = driverPropertyInfoArray[i];
                driverPropertyInfoMap.put(driverPropertyInfo.name, driverPropertyInfo);
            }
View Full Code Here

                                String message, String url, Properties properties, String fieldName,
                                String key, String expected) {

                            Properties results =
                                    (Properties) invokeInstanceMethod(
                                            new Driver(), "setupConnectProperties",
                                            new Class[]{String.class, Properties.class},
                                            new Object[]{url, properties});

                            assertEquals(message, expected, results.getProperty(Messages.get(key)));
                        }
View Full Code Here

TOP

Related Classes of net.sourceforge.jtds.jdbc.Driver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.