Skip to content

Commit de6b204

Browse files
committed
dev: random utils
1 parent 36ce766 commit de6b204

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

bm-common/src/main/java/org/benchmarker/bmcommon/dto/PrepareInfo.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@ public class PrepareInfo {
1818
private String method;
1919
private Map<String, String> headers;
2020
private Map<String, Object> body;
21+
22+
public PrepareInfo random(){
23+
this.url = "url";
24+
this.method = "method";
25+
this.headers = Map.of("key", "value");
26+
this.body = Map.of("key", "value");
27+
return this;
28+
}
2129
}

bm-common/src/main/java/org/benchmarker/bmcommon/dto/TemplateInfo.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,16 @@ public class TemplateInfo {
2525
private Map<String, String> headers;
2626
private Map<String, Object> body;
2727
private PrepareInfo prepare;
28+
29+
public TemplateInfo random(){
30+
this.id = "id";
31+
this.name = "name";
32+
this.description = "description";
33+
this.url = "url";
34+
this.method = "method";
35+
this.headers = Map.of("key", "value");
36+
this.body = Map.of("key", "value");
37+
this.prepare = new PrepareInfo().random();
38+
return this;
39+
}
2840
}

0 commit comments

Comments
 (0)