forked from codecentric/gatling-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ronny Bräunlich
committed
Mar 12, 2019
1 parent
8d881bf
commit d7479d2
Showing
6 changed files
with
54 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
src/main/scala/dev/code_n_roll/gatling/jdbc/check/JdbcManyAnyCheck.scala
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
src/main/scala/dev/code_n_roll/gatling/jdbc/check/JdbcManyTCheck.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package dev.code_n_roll.gatling.jdbc.check | ||
|
||
import dev.code_n_roll.gatling.jdbc.JdbcCheck | ||
import dev.code_n_roll.gatling.jdbc.Predef.ManyAnyResult | ||
import io.gatling.commons.validation.{Validation, _} | ||
import io.gatling.core.check._ | ||
import io.gatling.core.check.extractor.{Extractor, FindAllArity} | ||
import io.gatling.core.session.{Expression, _} | ||
|
||
object JdbcManyTCheck { | ||
|
||
trait JdbcManyTCheckType | ||
|
||
def manyTPreparer[T]: Preparer[List[T], List[T]] = something => something.success | ||
|
||
def manyTCheckMaterializer[T]: CheckMaterializer[JdbcManyTCheckType, JdbcCheck[T], List[T], List[T]] = new CheckMaterializer[JdbcManyTCheckType, JdbcCheck[T], List[T], List[T]] { | ||
override protected def preparer: Preparer[List[T], List[T]] = manyTPreparer | ||
|
||
override protected def specializer: Specializer[JdbcCheck[T], List[T]] = identity | ||
} | ||
|
||
def manyTExtractor[T]: Expression[Extractor[List[T], List[T]] with FindAllArity] = | ||
new Extractor[List[T], List[T]] with FindAllArity { | ||
override def name: String = "manyT" | ||
|
||
override def apply(prepared: List[T]): Validation[Option[List[T]]] = Some(prepared).success | ||
}.expressionSuccess | ||
|
||
def manyTResults[T] = new DefaultFindCheckBuilder[JdbcManyTCheckType, List[T], List[T]]( | ||
manyTExtractor, | ||
displayActualValue = true | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters