Skip to content

Commit

Permalink
Update LegacyResultIT.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
adamfilipow92 authored and mergify-bot committed Apr 16, 2021
1 parent d108156 commit 8382809
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions integration_tests/src/test/kotlin/integration/LegacyResultIT.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package integration

import FlankCommand
import com.google.common.truth.Truth
import com.google.common.truth.Truth.assertThat
import flank.common.isWindows
import org.junit.Assume.assumeFalse
import org.junit.Test
import run
import utils.CONFIGS_PATH
Expand Down Expand Up @@ -37,17 +39,17 @@ class LegacyResultIT {

val resOutput = result.output.removeUnicode()
val resultDirectory = resOutput.findTestDirectoryFromOutput()
Truth.assertThat(resultDirectory.toJUnitXmlFile().exists()).isTrue()
assertThat(resultDirectory.toJUnitXmlFile().exists()).isTrue()

val outputReport = resultDirectory.toOutputReportFile().json().asOutputReport()

Truth.assertThat(outputReport.error).isEmpty()
Truth.assertThat(outputReport.cost).isNotNull()
assertThat(outputReport.error).isEmpty()
assertThat(outputReport.cost).isNotNull()

outputReport.assertCostMatches()

Truth.assertThat(outputReport.testResults.count()).isEqualTo(1)
Truth.assertThat(outputReport.weblinks.count()).isEqualTo(1)
assertThat(outputReport.testResults.count()).isEqualTo(1)
assertThat(outputReport.weblinks.count()).isEqualTo(1)

val testSuiteOverview = outputReport.firstTestSuiteOverview

Expand All @@ -59,6 +61,7 @@ class LegacyResultIT {

@Test
fun iosLegacyJUnitResultTest() {
assumeFalse(isWindows)
val result = FlankCommand(
flankPath = FLANK_JAR_PATH,
ymlPath = "$CONFIGS_PATH/flank_ios_single_legacy.yml",
Expand All @@ -72,15 +75,15 @@ class LegacyResultIT {

val resOutput = result.output.removeUnicode()
val resultDirectory = resOutput.findTestDirectoryFromOutput()
Truth.assertThat(resultDirectory.toJUnitXmlFile().exists()).isTrue()
assertThat(resultDirectory.toJUnitXmlFile().exists()).isTrue()

val outputReport = resultDirectory.toOutputReportFile().json().asOutputReport()

Truth.assertThat(outputReport.error).isEmpty()
Truth.assertThat(outputReport.cost).isNotNull()
assertThat(outputReport.error).isEmpty()
assertThat(outputReport.cost).isNotNull()

Truth.assertThat(outputReport.testResults.count()).isEqualTo(1)
Truth.assertThat(outputReport.weblinks.count()).isEqualTo(1)
assertThat(outputReport.testResults.count()).isEqualTo(1)
assertThat(outputReport.weblinks.count()).isEqualTo(1)

val testSuiteOverview = outputReport.firstTestSuiteOverview

Expand Down

0 comments on commit 8382809

Please sign in to comment.