@@ -53,74 +53,6 @@ public void setUp() {
53
53
assertNotNull (System .getenv ("GOOGLE_APPLICATION_CREDENTIALS" ));
54
54
}
55
55
56
- @ Test
57
- public void testStringInspectionReturnsInfoTypes () throws Exception {
58
- String text =
59
- "\" My phone number is (234) 456-7890 and my email address is [email protected] \" " ;
60
- Inspect .main (new String [] {"-s" , text , "-infoTypes" , "PHONE_NUMBER" , "EMAIL_ADDRESS" });
61
- String output = bout .toString ();
62
-
63
- assertThat (output , containsString ("PHONE_NUMBER" ));
64
- assertThat (output , containsString ("EMAIL_ADDRESS" ));
65
- }
66
-
67
- @ Test
68
- public void testStringInspectionReturnsCustomInfoTypes () throws Exception {
69
- String text =
70
- "\" My phone number is (234) 456-7890 and my email address is [email protected] \" " ;
71
- Inspect .main (
72
- new String [] {
73
- "-s" ,
74
- text ,
75
- "-customDictionaries" ,
76
-
77
- "-customRegexes" ,
78
- "\\ (\\ d{3}\\ ) \\ d{3}-\\ d{4}"
79
- });
80
- String output = bout .toString ();
81
-
82
- assertThat (output , containsString ("CUSTOM_DICTIONARY_0" ));
83
- assertThat (output , containsString ("CUSTOM_REGEX_0" ));
84
- }
85
-
86
- @ Test
87
- public void testTextFileInspectionReturnsInfoTypes () throws Exception {
88
- Inspect .main (
89
- new String [] {
90
- "-f" , "src/test/resources/test.txt" , "-infoTypes" , "PHONE_NUMBER" , "EMAIL_ADDRESS"
91
- });
92
- String output = bout .toString ();
93
- assertThat (output , containsString ("PHONE_NUMBER" ));
94
- assertThat (output , containsString ("EMAIL_ADDRESS" ));
95
- }
96
-
97
- @ Test
98
- public void testTextFileInspectionReturnsCustomInfoTypes () throws Exception {
99
- Inspect .main (
100
- new String [] {
101
- "-f" ,
102
- "src/test/resources/test.txt" ,
103
- "-customDictionaries" ,
104
-
105
- "-customRegexes" ,
106
- "\\ (\\ d{3}\\ ) \\ d{3}-\\ d{4}"
107
- });
108
- String output = bout .toString ();
109
- assertThat (output , containsString ("CUSTOM_DICTIONARY_0" ));
110
- assertThat (output , containsString ("CUSTOM_REGEX_0" ));
111
- }
112
-
113
- @ Test
114
- public void testImageFileInspectionReturnsInfoTypes () throws Exception {
115
- Inspect .main (
116
- new String [] {
117
- "-f" , "src/test/resources/test.png" , "-infoTypes" , "PHONE_NUMBER" , "EMAIL_ADDRESS"
118
- });
119
- String output = bout .toString ();
120
- assertThat (output , containsString ("PHONE_NUMBER" ));
121
- assertThat (output , containsString ("EMAIL_ADDRESS" ));
122
- }
123
-
124
56
// Requires that bucket by the specified name exists
125
57
@ Test
126
58
public void testGcsFileInspectionReturnsInfoTypes () throws Exception {
0 commit comments