Sixth Learning: 1. Logic Judgment Tags:
Java code:
1
2 Define some variables
3
Class = "ORG.
Apache.
Struts.
WebApp.
EXERCISE.
TestBean "/> <%
4
String bool1 = "
True ";
5
String bool2 = "
False
6
String str1 = "this is a string";
Seduce
String str2 = "less Than";
8
String str3 = "xyz greater Than";
9%>
10 equal
11 <%
4
String Doub1 = "
321.
0 ";
5
String doub2 = "
111.
0 ";
6
String Doub3 = "
333.
0 ";
Seduce
String long1 = "
321 ";
8
String long2 = "
111 ";
9
String long3 = "
333 ";
10
String short1 = "
987 "
11
String short2 = "
654 ";
12
String short3 = "
999 "
13%>
14 equals
15 Notequal logic: Notequal>
26
27
2. Logic judgment is empty:
Java code:
1
2
Class = "ORG.
Apache.
Struts.
WebApp.
EXERCISE.
TestBean "/>
3
4
5
Test Type TH>
6 | Correct Value TH>
7 | Test Result TH>
8 tr>
9 |
10
Missing Bean, No Property Attribute TD>
11 | EMPTY TD>
12 |
13 EMPTY logic: EMPTY>
14 Notempty logic: NOTEMPTY>
15 td>
16 TR>
17 |
18
Not-Missing Bean, No Property Attribute TD>
19 | NOTEMPTY TD>
20 |
21 EMPTY logic: EMPTY>
22 Notempty logic: NOTEMPTY>
23 td>
24 tr>
25 |
26
NULL TD>
27 | EMPTY TD>
28 |
29 EMPTY logic: EMPTY>
30 Notempty logic: NOTEMPTY>
31 td>
32 TR>
33 |
34
EMPTY STRING TD>
35 | EMPTY TD>
36 |
37 EMPTY logic: EMPTY>
38 Notempty logic: NOTEMPTY> 39 td>
40 tr>
41 |
42
NON-EMPTY STRING TD>
43 | NOTEMPTY TD>
44 |
45 EMPTY logic: EMPTY>
46 Notempty logic: NOTEMPTY>
47 td>
48 tr>
49 |
50
EMPTY Collection TD>
51 | EMPTY TD>
52 |
53 EMPTY logic: EMPTY>
54 Notempty logic: NOTEMPTY>
55 td>
56 TR>
57 |
58
NON-EMPTY Collection TD>
59 | Noteempty TD>
60 |
61 EMPTY logic: EMPTY>
62 Notempty logic: NOTEMPTY>
63 td>
64 tr>
65 |
66
EMPTY MAP TD>
67 | EMPTY TD>
68 |
69 EMPTY logic: EMPTY>
70 Notempty logic: Notempty> 71 td>
72 TR>
73 |
74
NON-EMPTY MAP TD>
75 | NOTEMPTY TD>
76 |
77 EMPTY logic: EMPTY>
78 Notempty logic: NOTEMPTY>
79 td>
80 tr>
81 |
82
Unsupported Object TD>
83 | NOTEMPTY TD>
84 |
85 EMPTY logic: EMPTY>
86 Notempty logic: NOTEMPTY>
87 td>
88 tr>
89 TABLE>
90
转载请注明原文地址:https://www.9cbs.com/read-113258.html
|