File tree 1 file changed +26
-0
lines changed
src/test/java/com/cmpe202/individualproject/main
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .cmpe202 .individualproject .main ;
2
+
3
+ import org .junit .Assert ;
4
+ import org .junit .jupiter .api .Test ;
5
+
6
+ class AppTest {
7
+
8
+ @ Test
9
+ void checkforValidFileType () {
10
+ // Test case for checking a valid file type
11
+ String inputFile = "src/test/java/sampleFiles/inputxmlcopy.xml" ;
12
+ App appObj = new App ();
13
+ String result = appObj .getFileType (inputFile );
14
+ Assert .assertEquals (result , "xml" );
15
+ }
16
+
17
+ @ Test
18
+ void checkforInvalidFileType () {
19
+ // Test case for checking an invalid file type
20
+ String inputFile = "src/test/java/sampleFiles/inputxmlcopy.xml" ;
21
+ App appObj = new App ();
22
+ String result = appObj .getFileType (inputFile );
23
+ Assert .assertNotEquals (result , "json" );
24
+ }
25
+
26
+ }
You can’t perform that action at this time.
0 commit comments