All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.avito.report.inmemory.OnlyLastExecutionMattersStrategy.kt Maven / Gradle / Ivy

Go to download

Collection of infrastructure libraries and gradle plugins of Avito Android project

There is a newer version: 2023.22
Show newest version
package com.avito.report.inmemory

import com.avito.report.model.AndroidTest
import com.avito.report.model.TestAttempt

internal class OnlyLastExecutionMattersStrategy : TestAttemptsAggregateStrategy {

    override fun getTestResult(executions: Collection): AndroidTest {
        require(executions.isNotEmpty()) { "TestAttemptsAggregateStrategy called with no executions" }
        val sortedExecutions = executions.sortedBy { it.executionNumber }.map { it.testResult }
        return sortedExecutions.last()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy