Skip to content

Instantly share code, notes, and snippets.

@musketyr
Created July 30, 2021 15:03
Show Gist options
  • Save musketyr/7cb32572474fa59584b90e08d5dcd0f7 to your computer and use it in GitHub Desktop.
Save musketyr/7cb32572474fa59584b90e08d5dcd0f7 to your computer and use it in GitHub Desktop.
import groovy.transform.CompileStatic
import hello.legacy.VehicleDataService
import io.micronaut.context.annotation.Bean
import io.micronaut.context.annotation.Factory
import spock.mock.DetachedMockFactory
import javax.inject.Singleton
@Factory
@CompileStatic
class MockDataServicesFactory {
@Bean
@Singleton
VehicleDataService vehicleDataService() {
return new DetachedMockFactory().Mock(VehicleDataService)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment