Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Junit testing #432

Merged
merged 5 commits into from
Aug 8, 2017
Merged

Junit testing #432

merged 5 commits into from
Aug 8, 2017

Conversation

peterbae
Copy link
Contributor

@peterbae peterbae commented Aug 3, 2017

Added CallableStatementTest and PrecisionScaleTest

@peterbae peterbae requested a review from AfsanehR-zz August 3, 2017 19:27
@msftclas
Copy link

msftclas commented Aug 3, 2017

@peterbae,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

}

private static void dropTables() throws SQLException {
stmt.executeUpdate("if object_id('" + table1 + "','U') is not null" + " drop table " + table1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use Utils.dropTable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.


import java.math.BigDecimal;
import java.sql.Date;
import java.sql.DriverManager;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please delete the unused imports

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@@ -0,0 +1,2645 @@
package com.microsoft.sqlserver.jdbc.AlwaysEncrypted;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

}

@Test
public void testNumericPrecision8Scale2_Null() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove _ in the test name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

.format(new Date(1450812362177L - offsetFromGMT - offsetFromGMT + offset));
}

@Test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. One last comment is to add javadocs for the test methods and a general description at the beginning of the file explaining what each class file is containing and testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@codecov-io
Copy link

codecov-io commented Aug 8, 2017

Codecov Report

Merging #432 into dev will increase coverage by 0.27%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #432      +/-   ##
============================================
+ Coverage     45.92%   46.19%   +0.27%     
+ Complexity     2198     2194       -4     
============================================
  Files           108      108              
  Lines         25210    25210              
  Branches       4164     4164              
============================================
+ Hits          11577    11646      +69     
+ Misses        11711    11548     -163     
- Partials       1922     2016      +94
Flag Coverage Δ Complexity Δ
#JDBC41 46.04% <ø> (+0.36%) 2185 <ø> (ø) ⬇️
#JDBC42 46.03% <ø> (+0.22%) 2183 <ø> (-9) ⬇️
Impacted Files Coverage Δ Complexity Δ
...om/microsoft/sqlserver/jdbc/SimpleInputStream.java 51.11% <0%> (-5.19%) 11% <0%> (-5%)
...ava/com/microsoft/sqlserver/jdbc/ScrollWindow.java 73.17% <0%> (-2.44%) 17% <0%> (-2%)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 53.52% <0%> (-1.73%) 0% <0%> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerException.java 75.6% <0%> (-1.63%) 28% <0%> (-1%)
...n/java/com/microsoft/sqlserver/jdbc/tdsparser.java 68.46% <0%> (-0.91%) 0% <0%> (ø)
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 59.17% <0%> (-0.87%) 88% <0%> (-3%)
...oft/sqlserver/jdbc/SQLServerResultSetMetaData.java 40.97% <0%> (-0.7%) 23% <0%> (-1%)
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 52.61% <0%> (-0.39%) 239% <0%> (-4%)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 32.86% <0%> (-0.29%) 242% <0%> (-9%)
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 45.71% <0%> (-0.24%) 273% <0%> (-15%)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7741ee9...3f0baf0. Read the comment docs.

@AfsanehR-zz
Copy link
Contributor

Thank you @peterbae for fixing other test classes!

@peterbae peterbae merged commit fcd913d into microsoft:dev Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants