Class HttpRequestTestsTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.protocoltests.traits.HttpRequestTestsTrait
All Implemented Interfaces:
software.amazon.smithy.model.FromSourceLocation, software.amazon.smithy.model.node.ToNode, software.amazon.smithy.model.shapes.ToShapeId, software.amazon.smithy.model.traits.Trait

public final class HttpRequestTestsTrait extends software.amazon.smithy.model.traits.AbstractTrait
Defines HTTP request protocol tests.
  • Field Details

    • ID

      public static final software.amazon.smithy.model.shapes.ShapeId ID
  • Constructor Details

    • HttpRequestTestsTrait

      public HttpRequestTestsTrait(List<HttpRequestTestCase> testCases)
    • HttpRequestTestsTrait

      public HttpRequestTestsTrait(software.amazon.smithy.model.SourceLocation sourceLocation, List<HttpRequestTestCase> testCases)
  • Method Details

    • getTestCases

      public List<HttpRequestTestCase> getTestCases()
    • getTestCasesFor

      public List<HttpRequestTestCase> getTestCasesFor(AppliesTo appliesTo)
      Gets all test cases that apply to a client or server.

      Test cases that define an appliesTo member are tests that should only be implemented by clients or servers. Is is assumed that test cases that do not define an appliesTo member are implemented by both client and server implementations.

      Parameters:
      appliesTo - The type of test case to retrieve.
      Returns:
      Returns the matching test cases.
    • createNode

      protected software.amazon.smithy.model.node.Node createNode()
      Specified by:
      createNode in class software.amazon.smithy.model.traits.AbstractTrait