[JAVA][Rest-assured] reqSpec() method has been added into api.mustache for requests custom… (#7556)

* reqSpec() method has been added into api.mustache for requests customisation (group operations)

* add - reqSpec() has been added to samples
This commit is contained in:
Victor Orlovsky 2018-02-08 09:51:23 +03:00 committed by William Cheng
parent ee561fcd63
commit 62a930223f
7 changed files with 56 additions and 0 deletions

View File

@ -73,6 +73,14 @@ public class {{classname}} {
return this;
}
/**
* Customise request specification
*/
public {{classname}} reqSpec(Consumer<RequestSpecBuilder> consumer) {
consumer.accept(reqSpec);
return this;
}
{{#operations}}
{{#operation}}
/**

View File

@ -74,6 +74,14 @@ public class AnotherFakeApi {
return this;
}
/**
* Customise request specification
*/
public AnotherFakeApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
consumer.accept(reqSpec);
return this;
}
/**
* To test special tags
* To test special tags

View File

@ -110,6 +110,14 @@ public class FakeApi {
return this;
}
/**
* Customise request specification
*/
public FakeApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
consumer.accept(reqSpec);
return this;
}
/**
*
* Test serialization of outer boolean types

View File

@ -74,6 +74,14 @@ public class FakeClassnameTags123Api {
return this;
}
/**
* Customise request specification
*/
public FakeClassnameTags123Api reqSpec(Consumer<RequestSpecBuilder> consumer) {
consumer.accept(reqSpec);
return this;
}
/**
* To test class name in snake case
*

View File

@ -105,6 +105,14 @@ public class PetApi {
return this;
}
/**
* Customise request specification
*/
public PetApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
consumer.accept(reqSpec);
return this;
}
/**
* Add a new pet to the store
*

View File

@ -86,6 +86,14 @@ public class StoreApi {
return this;
}
/**
* Customise request specification
*/
public StoreApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
consumer.accept(reqSpec);
return this;
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors

View File

@ -102,6 +102,14 @@ public class UserApi {
return this;
}
/**
* Customise request specification
*/
public UserApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
consumer.accept(reqSpec);
return this;
}
/**
* Create user
* This can only be done by the logged in user.