Skip to content

Commit ccb530f

Browse files
authored
Tests (#36)
* successfully added unit test for Index * made a directory restructure and updated the python script to use the build directory for both testing and running * Added other unit tests and resolved a bug * Refactored the python script * Updated tests and javadocs for dbdiffcheker package.
1 parent 853e35a commit ccb530f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+892
-230
lines changed

.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# Compiled class file
2-
dbdiffchecker/*.class
2+
src/dbdiffchecker/*.class
3+
src/tests/*.class
34

45
# build data
56
build/
67

7-
# test data
8-
test/
9-
108
# log data
119
logs/
1210

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Routine Options
6464
run - makes and runs the JAR file
6565
push - commits the current repo and pushes it
6666
debug - runs the current code base for testing
67+
test - runs the unit tests on the source code
6768
clean - deletes the test, logs, and build directories
6869
Enter desired option:
6970
```
@@ -86,11 +87,11 @@ After modifying any of the Java files in the repository, you can go to the base
8687
python routines.py
8788
```
8889

89-
When prompted for the routine to run, enter 'debug'. This will compile all of the current Java files into the test/db_diff_checker_gui folder where it will be run if no errors occur (no JAR file will be created).
90+
When prompted for the routine to run, enter 'debug'. This will compile all of the current Java files into the test/dbdiffchecker folder where it will be run if no errors occur (no JAR file will be created).
9091

9192
### Manually Running The JAR File
9293

93-
In order to use the JAR file with logs, make sure that where you run the jar file you have a logs folder.
94+
In order to use the JAR file with logs, make sure that where you run the jar file you have a logs folder. Also make sure that the jar file is located in the same directory as the lib folder containing the jar files for the reopsitory.
9495

9596
To run the applciation through the JAR file run
9697

docs/allclasses-frame.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:19 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:29 EDT 2019 -->
66
<title>All Classes</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
<script type="text/javascript" src="script.js"></script>
1010
</head>

docs/allclasses-noframe.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:19 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:29 EDT 2019 -->
66
<title>All Classes</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
<script type="text/javascript" src="script.js"></script>
1010
</head>

docs/constant-values.html

+52-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:19 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:29 EDT 2019 -->
66
<title>Constant Field Values</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
<script type="text/javascript" src="script.js"></script>
1010
</head>
@@ -70,6 +70,56 @@
7070
<div class="header">
7171
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
7272
<h2 title="Contents">Contents</h2>
73+
<ul>
74+
<li><a href="#dbdiffchecker">dbdiffchecker.*</a></li>
75+
</ul>
76+
</div>
77+
<div class="constantValuesContainer"><a name="dbdiffchecker">
78+
<!-- -->
79+
</a>
80+
<h2 title="dbdiffchecker">dbdiffchecker.*</h2>
81+
<ul class="blockList">
82+
<li class="blockList">
83+
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
84+
<caption><span>dbdiffchecker.<a href="dbdiffchecker/FileHandler.html" title="class in dbdiffchecker">FileHandler</a></span><span class="tabEnd">&nbsp;</span></caption>
85+
<tr>
86+
<th class="colFirst" scope="col">Modifier and Type</th>
87+
<th scope="col">Constant Field</th>
88+
<th class="colLast" scope="col">Value</th>
89+
</tr>
90+
<tbody>
91+
<tr class="altColor">
92+
<td class="colFirst"><a name="dbdiffchecker.FileHandler.databaseSnapshotFileName">
93+
<!-- -->
94+
</a><code>public&nbsp;static&nbsp;final&nbsp;java.lang.String</code></td>
95+
<td><code><a href="dbdiffchecker/FileHandler.html#databaseSnapshotFileName">databaseSnapshotFileName</a></code></td>
96+
<td class="colLast"><code>"dbsnapshot"</code></td>
97+
</tr>
98+
<tr class="rowColor">
99+
<td class="colFirst"><a name="dbdiffchecker.FileHandler.lastSequelStatementFileName">
100+
<!-- -->
101+
</a><code>public&nbsp;static&nbsp;final&nbsp;java.lang.String</code></td>
102+
<td><code><a href="dbdiffchecker/FileHandler.html#lastSequelStatementFileName">lastSequelStatementFileName</a></code></td>
103+
<td class="colLast"><code>"lastRun.txt"</code></td>
104+
</tr>
105+
<tr class="altColor">
106+
<td class="colFirst"><a name="dbdiffchecker.FileHandler.logFileName">
107+
<!-- -->
108+
</a><code>public&nbsp;static&nbsp;final&nbsp;java.lang.String</code></td>
109+
<td><code><a href="dbdiffchecker/FileHandler.html#logFileName">logFileName</a></code></td>
110+
<td class="colLast"><code>"activity.log"</code></td>
111+
</tr>
112+
<tr class="rowColor">
113+
<td class="colFirst"><a name="dbdiffchecker.FileHandler.logFolder">
114+
<!-- -->
115+
</a><code>public&nbsp;static&nbsp;final&nbsp;java.lang.String</code></td>
116+
<td><code><a href="dbdiffchecker/FileHandler.html#logFolder">logFolder</a></code></td>
117+
<td class="colLast"><code>"logs"</code></td>
118+
</tr>
119+
</tbody>
120+
</table>
121+
</li>
122+
</ul>
73123
</div>
74124
<!-- ======= START OF BOTTOM NAVBAR ====== -->
75125
<div class="bottomNav"><a name="navbar.bottom">

docs/dbdiffchecker/Column.html

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:13 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:25 EDT 2019 -->
66
<title>Column</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
99
<script type="text/javascript" src="../script.js"></script>
1010
</head>
@@ -118,10 +118,7 @@ <h2 title="Class Column" class="title">Class Column</h2>
118118
<br>
119119
<pre>public class <span class="typeNameLabel">Column</span>
120120
extends <a href="../dbdiffchecker/Schema.html" title="class in dbdiffchecker">Schema</a></pre>
121-
<div class="block">Column resembles a column in MySQL and contains column info.
122-
Program Name: Database Difference Checker
123-
CSCI Course: 325
124-
Grade Received: Pass</div>
121+
<div class="block">Column resembles a column in MySQL and contains column info.</div>
125122
<dl>
126123
<dt><span class="simpleTagLabel">Since:</span></dt>
127124
<dd>9-10-17</dd>
@@ -189,7 +186,7 @@ <h3>Method Summary</h3>
189186
<tr id="i0" class="altColor">
190187
<td class="colFirst"><code>java.lang.String</code></td>
191188
<td class="colLast"><code><span class="memberNameLink"><a href="../dbdiffchecker/Column.html#getDetails--">getDetails</a></span>()</code>
192-
<div class="block">returns the column detailts.</div>
189+
<div class="block">Returns the column detailts.</div>
193190
</td>
194191
</tr>
195192
</table>
@@ -262,10 +259,10 @@ <h3>Method Detail</h3>
262259
<li class="blockList">
263260
<h4>getDetails</h4>
264261
<pre>public&nbsp;java.lang.String&nbsp;getDetails()</pre>
265-
<div class="block">returns the column detailts.</div>
262+
<div class="block">Returns the column detailts.</div>
266263
<dl>
267264
<dt><span class="returnLabel">Returns:</span></dt>
268-
<dd>the info about the column</dd>
265+
<dd>Info about the column.</dd>
269266
</dl>
270267
</li>
271268
</ul>

docs/dbdiffchecker/DBCompare.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:16 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:26 EDT 2019 -->
66
<title>DBCompare</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
99
<script type="text/javascript" src="../script.js"></script>
1010
</head>
@@ -144,10 +144,7 @@ <h2 title="Class DBCompare" class="title">Class DBCompare</h2>
144144
<pre>public class <span class="typeNameLabel">DBCompare</span>
145145
extends <a href="../dbdiffchecker/JFrameV2.html" title="class in dbdiffchecker">JFrameV2</a></pre>
146146
<div class="block">DBCompare is a JFrame that takes user input to make a comparison between 1
147-
devDatabase and a devDatabase snapshot or to take a devDatabase snapshot.
148-
Program Name: Database Difference Checker
149-
CSCI Course: 325
150-
Grade Received: Pass</div>
147+
devDatabase and a devDatabase snapshot or to take a devDatabase snapshot.</div>
151148
<dl>
152149
<dt><span class="simpleTagLabel">Since:</span></dt>
153150
<dd>9-20-17</dd>

docs/dbdiffchecker/DB_Diff_Checker_GUI.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:15 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:26 EDT 2019 -->
66
<title>DB_Diff_Checker_GUI</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
99
<script type="text/javascript" src="../script.js"></script>
1010
</head>
@@ -143,10 +143,7 @@ <h2 title="Class DB_Diff_Checker_GUI" class="title">Class DB_Diff_Checker_GUI</h
143143
<br>
144144
<pre>public class <span class="typeNameLabel">DB_Diff_Checker_GUI</span>
145145
extends <a href="../dbdiffchecker/JFrameV2.html" title="class in dbdiffchecker">JFrameV2</a></pre>
146-
<div class="block">DB_Diff_Checker_GUI is a JFrame that takes user input to decide which JFrame to open.
147-
Program Name: Database Difference Checker
148-
CSCI Course: 325
149-
Grade Received: Pass</div>
146+
<div class="block">DB_Diff_Checker_GUI is a JFrame that takes user input to decide which JFrame to open.</div>
150147
<dl>
151148
<dt><span class="simpleTagLabel">Since:</span></dt>
152149
<dd>9-20-17</dd>

docs/dbdiffchecker/Database.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:13 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:25 EDT 2019 -->
66
<title>Database</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
99
<script type="text/javascript" src="../script.js"></script>
1010
</head>
@@ -114,10 +114,7 @@ <h2 title="Class Database" class="title">Class Database</h2>
114114
<pre>public class <span class="typeNameLabel">Database</span>
115115
extends java.lang.Object
116116
implements java.io.Serializable</pre>
117-
<div class="block">Database models a MYSQL database schema.
118-
Program Name: Database Difference Checker
119-
CSCI Course: 325
120-
Grade Received: Pass</div>
117+
<div class="block">Database models a MYSQL database schema.</div>
121118
<dl>
122119
<dt><span class="simpleTagLabel">Since:</span></dt>
123120
<dd>9-18-17</dd>

docs/dbdiffchecker/DatabaseDiffernceCheckerException.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:13 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:25 EDT 2019 -->
66
<title>DatabaseDiffernceCheckerException</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
99
<script type="text/javascript" src="../script.js"></script>
1010
</head>
@@ -117,10 +117,7 @@ <h2 title="Class DatabaseDiffernceCheckerException" class="title">Class Database
117117
<br>
118118
<pre>public class <span class="typeNameLabel">DatabaseDiffernceCheckerException</span>
119119
extends java.lang.Exception</pre>
120-
<div class="block">DatabaseDiffernceCheckerException used to wrap exception that occur throughtout the program.
121-
Program Name: Database Difference Checker
122-
CSCI Course: 325
123-
Grade Received: Pass</div>
120+
<div class="block">DatabaseDiffernceCheckerException used to wrap exception that occur throughtout the program.</div>
124121
<dl>
125122
<dt><span class="simpleTagLabel">Since:</span></dt>
126123
<dd>7-29-18</dd>

docs/dbdiffchecker/DbConn.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:16 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:27 EDT 2019 -->
66
<title>DbConn</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
99
<script type="text/javascript" src="../script.js"></script>
1010
</head>
@@ -110,10 +110,7 @@ <h2 title="Class DbConn" class="title">Class DbConn</h2>
110110
<pre>public class <span class="typeNameLabel">DbConn</span>
111111
extends java.lang.Object</pre>
112112
<div class="block">DbConn establishes a connection with a MySQL database based on the password,
113-
username, port, host, and database provided.
114-
Program Name: Database Difference Checker
115-
CSCI Course: 325
116-
Grade Received: Pass</div>
113+
username, port, host, and database provided.</div>
117114
<dl>
118115
<dt><span class="simpleTagLabel">Since:</span></dt>
119116
<dd>9-6-17</dd>

docs/dbdiffchecker/ErrorPopup.html

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_101) on Mon Mar 18 18:58:17 EDT 2019 -->
5+
<!-- Generated by javadoc (1.8.0_101) on Sat May 11 17:41:27 EDT 2019 -->
66
<title>ErrorPopup</title>
7-
<meta name="date" content="2019-03-18">
7+
<meta name="date" content="2019-05-11">
88
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
99
<script type="text/javascript" src="../script.js"></script>
1010
</head>
@@ -137,9 +137,7 @@ <h2 title="Class ErrorPopup" class="title">Class ErrorPopup</h2>
137137
<br>
138138
<pre>public class <span class="typeNameLabel">ErrorPopup</span>
139139
extends <a href="../dbdiffchecker/JFrameV2.html" title="class in dbdiffchecker">JFrameV2</a></pre>
140-
<div class="block">ErrorPopup is a JFrame that shows a message about an error that occurred.
141-
Program Name: Database Difference Checker CSCI Course: 325 Grade Received:
142-
Pass</div>
140+
<div class="block">ErrorPopup is a JFrame that shows a message about an error that occurred.</div>
143141
<dl>
144142
<dt><span class="simpleTagLabel">Since:</span></dt>
145143
<dd>9-21-17</dd>

0 commit comments

Comments
 (0)