Class EndpointSchema
java.lang.Object
org.evomaster.client.java.controller.problem.rpc.schema.EndpointSchema
- Direct Known Subclasses:
LocalAuthSetupSchema
endpoint dto for RPC service
-
Constructor Summary
ConstructorsConstructorDescriptionEndpointSchema(String name, String interfaceName, String clientTypeName, List<NamedTypedValue> requestParams, NamedTypedValue response, List<NamedTypedValue> exceptions, boolean authRequired, List<Integer> requiredAuthCandidates, Set<String> relatedCustomizedCandidates) -
Method Summary
Modifier and TypeMethodDescriptionorg.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDtogetDto()getName()newInvocationWithJavaOrKotlin(String responseVarName, String controllerVarName, String clientVariable, org.evomaster.client.java.controller.api.dto.SutInfoDto.OutputFormat outputFormat) process to generate java code to invoke this requestbooleansameEndpoint(org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto dto) booleansameEndpoint(org.evomaster.client.java.controller.api.dto.problem.rpc.SeededRPCActionDto dto) find an endpoint schema based on seeded testsvoidsetValue(org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto dto) set value of endpoint based on dto
-
Constructor Details
-
EndpointSchema
public EndpointSchema(String name, String interfaceName, String clientTypeName, List<NamedTypedValue> requestParams, NamedTypedValue response, List<NamedTypedValue> exceptions, boolean authRequired, List<Integer> requiredAuthCandidates, Set<String> relatedCustomizedCandidates) - Parameters:
name- is the name of the endpoint, ie, method nameinterfaceName- is the full name of the interfaceclientTypeName- is the client type with its full namerequestParams- is a list of parameters in requestresponse- is the response, ie, returnexceptions- is related to exception for this endpointauthRequired- specifies whether the endpoint clearly declares that it requires auth, eg with annotation note that if authRequired is false, the endpoint could also apply global auth setuprequiredAuthCandidates- represents required candidates for its auth setuprelatedCustomizedCandidates- represents related customizations based on their references
-
-
Method Details
-
getRelatedCustomizedCandidates
-
getName
-
getRequestParams
-
getResponse
-
getExceptions
-
getDto
public org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto getDto()- Returns:
- a dto with a respect to this endpoint such dto would be used between core and driver
-
sameEndpoint
public boolean sameEndpoint(org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto dto) - Parameters:
dto- is a dto of rpc call which contains value info- Returns:
- if this endpoint matches the specified dto
-
sameEndpoint
public boolean sameEndpoint(org.evomaster.client.java.controller.api.dto.problem.rpc.SeededRPCActionDto dto) find an endpoint schema based on seeded tests- Parameters:
dto- a seeded test dto- Returns:
- an endpoint schema
-
copyStructure
- Returns:
- a copy of this endpoint which contains its structure but not values
-
setValue
public void setValue(org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto dto) set value of endpoint based on dto- Parameters:
dto- contains value info the endpoint note that the dto is typically generated by core side, ie, search
-
newInvocationWithJavaOrKotlin
public List<String> newInvocationWithJavaOrKotlin(String responseVarName, String controllerVarName, String clientVariable, org.evomaster.client.java.controller.api.dto.SutInfoDto.OutputFormat outputFormat) process to generate java code to invoke this request- Parameters:
responseVarName- specifies a variable name representing a response of this endpointclientVariable-outputFormat-- Returns:
- code to send the request and set the response if exists
-