@@ -121,6 +121,68 @@ public void Test_Guard_IsAssignableToType_Fail()
121
121
Guard . IsAssignableToType ( 7 , typeof ( string ) , nameof ( Test_Guard_IsAssignableToType_Fail ) ) ;
122
122
}
123
123
124
+ [ TestCategory ( "Guard" ) ]
125
+ [ TestMethod ]
126
+ public void Test_Guard_IsNullOrEmpty_Ok ( )
127
+ {
128
+ Guard . IsNullOrEmpty ( null , nameof ( Test_Guard_IsNullOrEmpty_Ok ) ) ;
129
+ Guard . IsNullOrEmpty ( string . Empty , nameof ( Test_Guard_IsNullOrEmpty_Ok ) ) ;
130
+ }
131
+
132
+ [ TestCategory ( "Guard" ) ]
133
+ [ TestMethod ]
134
+ [ ExpectedException ( typeof ( ArgumentException ) ) ]
135
+ public void Test_Guard_IsNullOrEmpty_Fail ( )
136
+ {
137
+ Guard . IsNullOrEmpty ( "Hello" , nameof ( Test_Guard_IsNullOrEmpty_Fail ) ) ;
138
+ }
139
+
140
+ [ TestCategory ( "Guard" ) ]
141
+ [ TestMethod ]
142
+ public void Test_Guard_IsNotNullOrEmpty_Ok ( )
143
+ {
144
+ Guard . IsNotNullOrEmpty ( "Hello" , nameof ( Test_Guard_IsNotNullOrEmpty_Ok ) ) ;
145
+ }
146
+
147
+ [ TestCategory ( "Guard" ) ]
148
+ [ TestMethod ]
149
+ [ ExpectedException ( typeof ( ArgumentNullException ) ) ]
150
+ public void Test_Guard_IsNotNullOrEmpty_Null ( )
151
+ {
152
+ Guard . IsNotNullOrEmpty ( null , nameof ( Test_Guard_IsNotNullOrEmpty_Null ) ) ;
153
+ }
154
+
155
+ [ TestCategory ( "Guard" ) ]
156
+ [ TestMethod ]
157
+ [ ExpectedException ( typeof ( ArgumentException ) ) ]
158
+ public void Test_Guard_IsNotNullOrEmpty_Empty ( )
159
+ {
160
+ Guard . IsNotNullOrEmpty ( string . Empty , nameof ( Test_Guard_IsNotNullOrEmpty_Empty ) ) ;
161
+ }
162
+
163
+ [ TestCategory ( "Guard" ) ]
164
+ [ TestMethod ]
165
+ public void Test_Guard_IsNotNullOrWhiteSpace_Ok ( )
166
+ {
167
+ Guard . IsNotNullOrWhiteSpace ( "Hello" , nameof ( Test_Guard_IsNotNullOrWhiteSpace_Ok ) ) ;
168
+ }
169
+
170
+ [ TestCategory ( "Guard" ) ]
171
+ [ TestMethod ]
172
+ [ ExpectedException ( typeof ( ArgumentNullException ) ) ]
173
+ public void Test_Guard_IsNotNullOrWhiteSpace_Null ( )
174
+ {
175
+ Guard . IsNotNullOrWhiteSpace ( null , nameof ( Test_Guard_IsNotNullOrWhiteSpace_Null ) ) ;
176
+ }
177
+
178
+ [ TestCategory ( "Guard" ) ]
179
+ [ TestMethod ]
180
+ [ ExpectedException ( typeof ( ArgumentException ) ) ]
181
+ public void Test_Guard_IsNotNullOrWhiteSpace_Empty ( )
182
+ {
183
+ Guard . IsNotNullOrWhiteSpace ( " " , nameof ( Test_Guard_IsNotNullOrWhiteSpace_Empty ) ) ;
184
+ }
185
+
124
186
[ TestCategory ( "Guard" ) ]
125
187
[ TestMethod ]
126
188
public void Test_Guard_IsEqualTo_Ok ( )
0 commit comments