I'm away this week-end, will have a look on Monday.

On Sat, May 3, 2014 at 10:57 AM, James Pickering <notifications@github.com>
wrote:

>> +import io.gatling.core.result.writer.{ RunMessage, DataWriter }
>> +import org.joda.time.DateTime
>> +import io.gatling.core.controller.DataWritersInitialized
>> +
>> +/**
>> + * Created by hisg085 on 02/05/2014.
>> + */
>> +object WireMockSupport extends Fixture[TestKit with ImplicitSender] with Logging {
>> +  val wireMockPort = Option(Integer.getInteger("gatling.wireMock.port")).map(_.intValue).getOrElse(8702)
>> +  def httpProtocol = http.baseURL(s"http://localhost:$wireMockPort")
>> +
>> +  def runScenario(sb: ScenarioBuilder, timeout: FiniteDuration = 10 seconds, protocols: Protocols = Protocols(httpProtocol))(implicit testKit: TestKit with ImplicitSender) = {
>> +    val buildMethod = classOf[ScenarioBuilder].getMethod("build", classOf[ActorRef], classOf[Protocols])
>> +    buildMethod.setAccessible(true)
>> +    val actor = buildMethod.invoke(sb, testKit.self, protocols).asInstanceOf[ActorRef]
>> +    actor.tell(Session("TestSession", "testUser"), testKit.self)
> Bang takes the sender as an implicit. Since I hadn't imported `testKit._`, `self` wasn't available. Switching to `tell` was the laziest option, but importing `testKit._` would also work.
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/excilys/gatling/pull/1846/files#r12255587