File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/test/java/ru/mystamps/web Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 18
18
package ru .mystamps .web .tests ;
19
19
20
20
import java .time .Year ;
21
+ import java .util .Arrays ;
21
22
import java .util .HashSet ;
22
23
import java .util .List ;
23
24
import java .util .Set ;
@@ -164,4 +165,9 @@ public static List<TransactionParticipantDto> listOfTransactionParticipantDto()
164
165
);
165
166
}
166
167
168
+ public static String jsoupLocator () {
169
+ List <String > locators = Arrays .asList ("#id" , "a[href]" , "img[src$=.png]" , "div#logo" );
170
+ return sample (locators );
171
+ }
172
+
167
173
}
Original file line number Diff line number Diff line change @@ -51,10 +51,7 @@ public void setFieldShouldRequireNonBlankName() {
51
51
thrown .expect (IllegalStateException .class );
52
52
thrown .expectMessage ("Field name must be non-blank" );
53
53
54
- // @todo #685 SiteParserTest: introduce a method for generating random valid locator
55
- String anyValidLocator = "#id" ;
56
-
57
- parser .setField (nullOrBlank (), anyValidLocator );
54
+ parser .setField (nullOrBlank (), Random .jsoupLocator ());
58
55
}
59
56
60
57
@ Test
You can’t perform that action at this time.
0 commit comments