Class WiremockServiceImpl

java.lang.Object
edu.ucsb.cs156.dining.services.wiremock.WiremockService
edu.ucsb.cs156.dining.services.wiremock.WiremockServiceImpl

@Service("wiremockService") @Profile("wiremock") @ConfigurationProperties public class WiremockServiceImpl extends WiremockService
This is a service for mocking authentication using wiremock

This class relies on property values. For hints on testing, see: https://www.baeldung.com/spring-boot-testing-configurationproperties

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.github.tomakehurst.wiremock.WireMockServer
    This method returns the wiremockServer
    void
    This method initializes the WireMockServer
    static void
    setupOauthMocks(com.github.tomakehurst.wiremock.junit.Stubbing s, boolean isAdmin)
    This method sets up the necessary mocks for authentication
    static void
    setupUCSBDiningMocks(com.github.tomakehurst.wiremock.junit.Stubbing s)
    This method sets up the necessary mocks for the UCSB Dining API

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WiremockServiceImpl

      public WiremockServiceImpl()
  • Method Details

    • getWiremockServer

      public com.github.tomakehurst.wiremock.WireMockServer getWiremockServer()
      This method returns the wiremockServer
      Specified by:
      getWiremockServer in class WiremockService
      Returns:
      the wiremockServer
    • setupOauthMocks

      public static void setupOauthMocks(com.github.tomakehurst.wiremock.junit.Stubbing s, boolean isAdmin)
      This method sets up the necessary mocks for authentication
      Parameters:
      s - in an instance of a WireMockServer or WireMockExtension
    • setupUCSBDiningMocks

      public static void setupUCSBDiningMocks(com.github.tomakehurst.wiremock.junit.Stubbing s)
      This method sets up the necessary mocks for the UCSB Dining API
      Parameters:
      s - in an instance of a WireMockServer or WireMockExtension
    • init

      public void init()
      This method initializes the WireMockServer
      Specified by:
      init in class WiremockService