55
55
import org .junit .jupiter .api .Test ;
56
56
import org .junit .jupiter .api .extension .ExtendWith ;
57
57
58
+ import java .util .ArrayList ;
58
59
import java .util .Arrays ;
59
60
import java .util .List ;
60
61
import java .util .UUID ;
63
64
import static com .formkiq .testutils .aws .FkqAttributeService .createStringAttribute ;
64
65
import static org .junit .jupiter .api .Assertions .assertEquals ;
65
66
import static org .junit .jupiter .api .Assertions .assertNotNull ;
67
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
66
68
import static org .junit .jupiter .api .Assertions .fail ;
67
69
68
70
/** Unit Tests for request /sites/{siteId}/schema/document. */
@@ -88,10 +90,14 @@ public void testGetClassifications01() throws ApiException {
88
90
89
91
SchemaAttributes attr0 = createSchemaAttributes (List .of ("invoice" ), null );
90
92
93
+ List <String > ids = new ArrayList <>();
94
+
91
95
for (int i = 0 ; i < count ; i ++) {
92
96
AddClassificationRequest req = new AddClassificationRequest ()
93
97
.classification (new AddClassification ().name ("test_" + i ).attributes (attr0 ));
94
- this .schemasApi .addClassification (siteId , req );
98
+ String classificationId =
99
+ this .schemasApi .addClassification (siteId , req ).getClassificationId ();
100
+ ids .add (classificationId );
95
101
}
96
102
97
103
// when
@@ -102,6 +108,7 @@ public void testGetClassifications01() throws ApiException {
102
108
// then
103
109
int i = 0 ;
104
110
assertEquals (limit , attributes .size ());
111
+ assertTrue (ids .contains (attributes .get (i ).getClassificationId ()));
105
112
assertEquals ("joesmith" , attributes .get (i ).getUserId ());
106
113
assertNotNull (attributes .get (i ).getInsertedDate ());
107
114
assertEquals ("test_0" , attributes .get (i ++).getName ());
0 commit comments