Class WiremockServiceImpl

java.lang.Object
edu.ucsb.cs156.happiercows.services.wiremock.WiremockService
edu.ucsb.cs156.happiercows.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 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
    • init

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