Skip to content

Commit

Permalink
Added artifactory details
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed Aug 5, 2018
1 parent d7f28ee commit 2c79978
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions serenity-emailer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ buildscript {
}
apply plugin: 'kotlin'


ext {
bintrayPackage = 'serenity-emailer'
projectDescription = 'Serenity Email Report'
}

test {
useJUnitPlatform {
includeEngines 'junit-jupiter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.time.ZonedDateTime
class EmailReporter(val environmentVariables: EnvironmentVariables) : ExtendedReport {
override fun getName(): String = "email"

private val LOGGER = LoggerFactory.getLogger(SerenityEmailReport::class.java!!)
private val LOGGER = LoggerFactory.getLogger(SerenityEmailReport::class.java)

constructor() : this(Injectors.getInjector().getProvider<EnvironmentVariables>(EnvironmentVariables::class.java).get())

Expand Down Expand Up @@ -55,7 +55,7 @@ class EmailReporter(val environmentVariables: EnvironmentVariables) : ExtendedRe

writer.use {
val template = SerenityEmailReport.template().configuredIn(environmentVariables)
ThymeleafTemplateEngine(environmentVariables).merge(template, fields, writer)
ThymeleafTemplateEngine().merge(template, fields, writer)
}

return outputFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.thymeleaf.templateresolver.DefaultTemplateResolver
import java.io.Writer


class ThymeleafTemplateEngine(environmentVariables: EnvironmentVariables) {
class ThymeleafTemplateEngine() {

val templateEngine : TemplateEngine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fun maxDurationOf(outcomes: List<TestOutcome>): Duration = Duration.ofMillis(
)

fun averageDurationOf(outcomes: List<TestOutcome>): Duration = Duration.ofMillis(
if (outcomes.isEmpty()) 0 else outcomes.map { outcome -> outcome.duration }.average()!!.toLong()
if (outcomes.isEmpty()) 0 else outcomes.map { outcome -> outcome.duration }.average().toLong()
)

fun formattedDuration(duration: Duration): String {
Expand Down

0 comments on commit 2c79978

Please sign in to comment.