How to use increasing class of io.kotest.matchers.collections package

Best Kotest code snippet using io.kotest.matchers.collections.increasing

CollectionMatchersTest.kt

Source:CollectionMatchersTest.kt Github

copy

Full Screen

...200 items.shouldNotBeSortedBy { it.second }201 }202 }203 "shouldBeIncreasing" should {204 "test that a collection is monotonically increasing" {205 listOf(1, 2, 2, 3) shouldBe monotonicallyIncreasing<Int>()206 listOf(6, 5) shouldNotBe monotonicallyIncreasing<Int>()207 listOf(1, 2, 2, 3).shouldBeMonotonicallyIncreasing()208 listOf(6, 5).shouldNotBeMonotonicallyIncreasing()209 }210 "test that a collection is monotonically increasing according to comparator" {211 val comparator = Comparator(desc)212 listOf(3, 2, 2, 1) shouldBe monotonicallyIncreasingWith(comparator)213 listOf(5, 6) shouldNotBe monotonicallyIncreasingWith(comparator)214 listOf(3, 2, 2, 1).shouldBeMonotonicallyIncreasingWith(comparator)215 listOf(5, 6).shouldNotBeMonotonicallyIncreasingWith(comparator)216 }217 "test that a collection is strictly increasing" {218 listOf(1, 2, 3) shouldBe strictlyIncreasing<Int>()219 listOf(1, 2, 2, 3) shouldNotBe strictlyIncreasing<Int>()220 listOf(6, 5) shouldNotBe strictlyIncreasing<Int>()221 listOf(1, 2, 3).shouldBeStrictlyIncreasing()222 listOf(1, 2, 2, 3).shouldNotBeStrictlyIncreasing()223 listOf(6, 5).shouldNotBeStrictlyIncreasing()224 }225 "test that a collection is strictly increasing according to comparator" {226 val comparator = Comparator(desc)227 listOf(3, 2, 1) shouldBe strictlyIncreasingWith(comparator)228 listOf(3, 2, 2, 1) shouldNotBe strictlyIncreasingWith(comparator)229 listOf(5, 6) shouldNotBe strictlyIncreasingWith(comparator)230 listOf(3, 2, 1).shouldBeStrictlyIncreasingWith(comparator)231 listOf(3, 2, 2, 1).shouldNotBeStrictlyIncreasingWith(comparator)232 listOf(5, 6).shouldNotBeStrictlyIncreasingWith(comparator)233 }234 }235 "shouldBeDecreasing" should {236 "test that a collection is monotonically decreasing" {237 listOf(3, 2, 2, -4) shouldBe monotonicallyDecreasing<Int>()238 listOf(5, 6) shouldNotBe monotonicallyDecreasing<Int>()239 listOf(3, 2, 2, -4).shouldBeMonotonicallyDecreasing()...

Full Screen

Full Screen

Chap5.kt

Source:Chap5.kt Github

copy

Full Screen

...155 test(::functionalWay, assertFunctionalWay)156 test(::realFunctionalWay, assertRealFunctionalWay)157 }158 "Example 5-16" {159 println("increasing list")160 testBigIntList(161 bigIntList = (1..10000000).toList(),162 assertImperativeWay = { millis: Long -> millis.shouldBeLessThanOrEqual(1) },163 assertFunctionalWay = { millis: Long -> millis.shouldBeGreaterThan(100) },164 assertRealFunctionalWay = { millis: Long -> millis.shouldBeLessThan(10) },165 )166 println("\ndecreasing list")167 testBigIntList(168 bigIntList = (10000000 downTo 1).toList(),169 assertImperativeWay = { millis: Long -> millis.shouldBeLessThanOrEqual(1) },170 assertFunctionalWay = { millis: Long -> millis.shouldBeGreaterThan(100) }, // 왜 functionalWay만 100ms가 넘지?171 assertRealFunctionalWay = { millis: Long -> millis.shouldBeLessThanOrEqual(1) },172 )173 }...

Full Screen

Full Screen

CollectionMatchers.kt

Source:CollectionMatchers.kt Github

copy

Full Screen

...91 else -> ". Element ${failure.value.second} at index ${failure.index + 1} was not monotonically increased from previous element."92 }93 return MatcherResult(94 failure == null,95 { "List [$snippet] should be monotonically increasing$elementMessage" },96 { "List [$snippet] should not be monotonically increasing" }97 )98}99fun <T : Comparable<T>> beMonotonicallyDecreasing(): Matcher<List<T>> = monotonicallyDecreasing()100fun <T : Comparable<T>> monotonicallyDecreasing(): Matcher<List<T>> = object : Matcher<List<T>> {101 override fun test(value: List<T>): MatcherResult {102 return testMonotonicallyDecreasingWith(value,103 Comparator { a, b -> a.compareTo(b) })104 }105}106fun <T> beMonotonicallyDecreasingWith(comparator: Comparator<in T>): Matcher<List<T>> = monotonicallyDecreasingWith(107 comparator)108fun <T> monotonicallyDecreasingWith(comparator: Comparator<in T>): Matcher<List<T>> = object : Matcher<List<T>> {109 override fun test(value: List<T>): MatcherResult {110 return testMonotonicallyDecreasingWith(value, comparator)111 }112}113private fun <T> testMonotonicallyDecreasingWith(value: List<T>, comparator: Comparator<in T>): MatcherResult {114 val failure = value.zipWithNext().withIndex().find { (_, pair) -> comparator.compare(pair.first, pair.second) < 0 }115 val snippet = value.show().value116 val elementMessage = when (failure) {117 null -> ""118 else -> ". Element ${failure.value.second} at index ${failure.index + 1} was not monotonically decreased from previous element."119 }120 return MatcherResult(121 failure == null,122 { "List [$snippet] should be monotonically decreasing$elementMessage" },123 { "List [$snippet] should not be monotonically decreasing" }124 )125}126fun <T : Comparable<T>> beStrictlyIncreasing(): Matcher<List<T>> = strictlyIncreasing()127fun <T : Comparable<T>> strictlyIncreasing(): Matcher<List<T>> = object : Matcher<List<T>> {128 override fun test(value: List<T>): MatcherResult {129 return testStrictlyIncreasingWith(value, Comparator { a, b -> a.compareTo(b) })130 }131}132fun <T> beStrictlyIncreasingWith(comparator: Comparator<in T>): Matcher<List<T>> = strictlyIncreasingWith(133 comparator)134fun <T> strictlyIncreasingWith(comparator: Comparator<in T>): Matcher<List<T>> = object : Matcher<List<T>> {135 override fun test(value: List<T>): MatcherResult {136 return testStrictlyIncreasingWith(value, comparator)137 }138}139private fun <T> testStrictlyIncreasingWith(value: List<T>, comparator: Comparator<in T>): MatcherResult {140 val failure = value.zipWithNext().withIndex().find { (_, pair) -> comparator.compare(pair.first, pair.second) >= 0 }141 val snippet = value.show().value142 val elementMessage = when (failure) {143 null -> ""144 else -> ". Element ${failure.value.second} at index ${failure.index + 1} was not strictly increased from previous element."145 }146 return MatcherResult(147 failure == null,148 { "List [$snippet] should be strictly increasing$elementMessage" },149 { "List [$snippet] should not be strictly increasing" }150 )151}152fun <T : Comparable<T>> beStrictlyDecreasing(): Matcher<List<T>> = strictlyDecreasing()153fun <T : Comparable<T>> strictlyDecreasing(): Matcher<List<T>> = object : Matcher<List<T>> {154 override fun test(value: List<T>): MatcherResult {155 return testStrictlyDecreasingWith(value, Comparator { a, b -> a.compareTo(b) })156 }157}158fun <T> beStrictlyDecreasingWith(comparator: Comparator<in T>): Matcher<List<T>> = strictlyDecreasingWith(159 comparator)160fun <T> strictlyDecreasingWith(comparator: Comparator<in T>): Matcher<List<T>> = object : Matcher<List<T>> {161 override fun test(value: List<T>): MatcherResult {162 return testStrictlyDecreasingWith(value, comparator)163 }...

Full Screen

Full Screen

increasing.kt

Source:increasing.kt Github

copy

Full Screen

...108 else -> ". Element ${failure.value.second} at index ${failure.index + 1} was not strictly increased from previous element."109 }110 return MatcherResult(111 failure == null,112 { "List [$snippet] should be strictly increasing$elementMessage" },113 { "List [$snippet] should not be strictly increasing" }114 )115}116fun <T : Comparable<T>> beMonotonicallyIncreasing(): Matcher<List<T>> = monotonicallyIncreasing()117fun <T : Comparable<T>> monotonicallyIncreasing(): Matcher<List<T>> = object : Matcher<List<T>> {118 override fun test(value: List<T>): MatcherResult {119 return testMonotonicallyIncreasingWith(value) { a, b -> a.compareTo(b) }120 }121}122fun <T> beMonotonicallyIncreasingWith(comparator: Comparator<in T>): Matcher<List<T>> =123 monotonicallyIncreasingWith(comparator)124fun <T> monotonicallyIncreasingWith(comparator: Comparator<in T>): Matcher<List<T>> = object : Matcher<List<T>> {125 override fun test(value: List<T>): MatcherResult {126 return testMonotonicallyIncreasingWith(value, comparator)127 }128}129private fun <T> testMonotonicallyIncreasingWith(value: List<T>, comparator: Comparator<in T>): MatcherResult {130 val failure = value.zipWithNext().withIndex().find { (_, pair) -> comparator.compare(pair.first, pair.second) > 0 }131 val snippet = value.print().value132 val elementMessage = when (failure) {133 null -> ""134 else -> ". Element ${failure.value.second} at index ${failure.index + 1} was not monotonically increased from previous element."135 }136 return MatcherResult(137 failure == null,138 { "List [$snippet] should be monotonically increasing$elementMessage" },139 { "List [$snippet] should not be monotonically increasing" }140 )141}...

Full Screen

Full Screen

TimeSeriesDBTest.kt

Source:TimeSeriesDBTest.kt Github

copy

Full Screen

1package org.raspikiln.tsdb2import io.kotest.core.spec.style.FunSpec3import io.kotest.matchers.collections.shouldBeMonotonicallyIncreasingWith4import io.kotest.matchers.doubles.shouldBeGreaterThan5import io.kotest.matchers.doubles.shouldBeGreaterThanOrEqual6import io.kotest.matchers.doubles.shouldBeLessThan7import io.kotest.matchers.ints.shouldBeExactly8import io.kotest.matchers.ints.shouldBeLessThan9import io.kotest.matchers.shouldBe10import kotlinx.coroutines.delay11import java.io.File12import java.time.Instant13import java.util.Comparator14import kotlin.random.Random15import kotlin.time.Duration16import kotlin.time.Duration.Companion.hours17import kotlin.time.Duration.Companion.seconds18class TimeSeriesDBTest : FunSpec({19 test("able to write and do things") {20 val db = timeSeriesDb(retention = 10.hours)21 val temperatureA = MetricGenerator(MetricIdentifier(name = "temperatureA"), 0..20)22 val temperatureB = MetricGenerator(MetricIdentifier(name = "temperatureB"), 40..60)23 var metricCount = 024 repeat(2_000) { _ ->25 val metricsAdded = (1..10).random()26 metricCount += metricsAdded27 repeat(metricsAdded) {28 db.write(listOf(temperatureA.next(), temperatureB.next()))29 }30 listOf(temperatureA, temperatureB).forEach { metric ->31 val query = db.query(metric.identifier, Instant.now().minusSeconds(3_000)..Instant.now()).toList()32 query.forEach { metric shouldContain it.value }33 query.shouldBeMonotonicallyIncreasingWith(Comparator.comparing { it.timestamp })34 query.count() shouldBe metricCount35 }36 delay(5)37 }38 }39 test("clear partitions after retention") {40 val db = timeSeriesDb(retention = 10.seconds)41 val metricMeasurement = MetricGenerator(MetricIdentifier(name = "temperatureA"), 0..20)42 repeat(500) {43 db.write(metricMeasurement.next())44 }45 delay(12_000)46 db.write(metricMeasurement.next())47 db.query(48 metricName = metricMeasurement.identifier,49 timestampRange = Instant.now().minusSeconds(20)..Instant.now()50 ).count() shouldBeExactly 151 }52})53data class MetricGenerator(54 val identifier: MetricIdentifier,55 val range: IntRange56) {57 infix fun shouldContain(value: Double) {58 range.first.toDouble() shouldBeLessThan value59 range.last.toDouble() shouldBeGreaterThanOrEqual value60 }61 fun next(): Measurement =62 Measurement(63 metric = identifier,64 datapoint = Datapoint(65 timestamp = Instant.now(),66 value = nextValue()67 )68 )69 private fun nextValue() = Random.Default.nextDouble(range.first.toDouble(), range.last.toDouble())70}71private fun timeSeriesDb(retention: Duration = 10.hours) =72 StandardTimeSeriesDB(options = StandardTimeSeriesDB.Options(73 directory = File("data-test"),74 partitionDuration = 10.seconds,75 partitionCapacity = 1_000,76 retention = retention,77 deleteDelayTime = 0.seconds78 )).apply { purgeAll() }...

Full Screen

Full Screen

OrganizationChecker.kt

Source:OrganizationChecker.kt Github

copy

Full Screen

1package com.tavrida.energysales.importData2import com.tavrida.energysales.data_access.models.Organization3import database_creation.xlsx.reader.OrganizationsWithStructureXlsReader4import io.kotest.matchers.collections.shouldBeMonotonicallyIncreasing5import io.kotest.matchers.collections.shouldBeSorted6import io.kotest.matchers.collections.shouldBeSortedWith7import io.kotest.matchers.collections.shouldNotBeEmpty8object OrganizationChecker {9 fun List<Organization>.check() {10 checkNameDuplicates()11 checkSerialNumberDuplicates()12 checkReadingChronologicalOrder()13 }14 private fun List<Organization>.checkReadingChronologicalOrder() {15 forEach {16 it.counters.forEach {17 it.readings.shouldNotBeEmpty()18 it.readings.map { it.readingTime }.shouldBeMonotonicallyIncreasing()19 }20 }21 }22 private fun List<Organization>.checkNameDuplicates() {23 val duplicatedNames = groupBy { it.name }24 .filter { it.value.size > 1 }25 .map { it.key }26 if (duplicatedNames.isNotEmpty()) {27 throw Exception("Organizations with duplicated names found: $duplicatedNames")28 }29 }30 private fun List<Organization>.checkSerialNumberDuplicates() {31 val duplicates = flatMap { org -> org.counters.map { org to it } }32 .groupBy { (org, counter) -> counter.serialNumber }33 .filter { it.value.size > 1 }34 .map { it.value.map { (org, counter) -> org.name to counter.serialNumber } }35 if (duplicates.isNotEmpty()) {36 throw Exception("Duplicated serial numbers found: $duplicates")37 }38 }39 @JvmName("checkSerialNumberDuplicatesOnListOfRecords")40 fun List<OrganizationsWithStructureXlsReader.OrganizationCounterReadingRecord>.checkSerialNumberDuplicates() {41 val duplicates = groupBy { it.serialNumber }42 .filter { it.value.size > 1 }43 .map { it.key }44 if (duplicates.isNotEmpty()) {45 throw Exception("Organizations with duplicated names found: $duplicates")46 }47 }48}...

Full Screen

Full Screen

DailyBalancesPropJqwikTest.kt

Source:DailyBalancesPropJqwikTest.kt Github

copy

Full Screen

...18 val result = list.expandToDaily()19 result.shouldContainAll(list)20 }21 @Property22 fun `result is strictly increasing by the balance date`(@ForAll("uniqueBalances") list: List<Balance>) {23 val result = list.expandToDaily()24 result.shouldBeStrictlyIncreasingWith(compareBy { it.date })25 }26 @Property27 fun `returns the whole range`(@ForAll("uniqueBalances") @NotEmpty list: List<Balance>) {28 val result = list.expandToDaily()29 result.map { it.date } shouldBe wholeDateRange(result.minOf { it.date }, result.maxOf { it.date })30 }31 @Provide32 fun uniqueBalances(): Arbitrary<List<Balance>> {33 val balanceArbitrary = combine(34 Dates.dates().between(LocalDate.of(1970, 1, 1), LocalDate.of(2030, 12, 31)),35 Arbitraries.bigDecimals()36 ) { d, a -> Balance(d, a) }...

Full Screen

Full Screen

DailyBalancesPropKotestTest.kt

Source:DailyBalancesPropKotestTest.kt Github

copy

Full Screen

...17 val result = list.expandToDaily()18 result.shouldContainAll(list)19 }20 }21 it("result is strictly increasing by the balance date") {22 checkAll(arbUniqueList()) { list ->23 val result = list.expandToDaily()24 result.shouldBeStrictlyIncreasingWith(compareBy { it.date })25 }26 }27 it("returns the whole range") {28 checkAll(arbUniqueList(minLength = 1)) { list ->29 val result = list.expandToDaily()30 result.map { it.date } shouldBe wholeDateRange(result.minOf { it.date }, result.maxOf { it.date })31 }32 }33 }34})...

Full Screen

Full Screen

increasing

Using AI Code Generation

copy

Full Screen

1 import io.kotest.matchers.collections.shouldContain2 import io.kotest.matchers.collections.shouldContainAll3 import io.kotest.matchers.collections.shouldContainExactly4 import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder5 import io.kotest.matchers.collections.shouldContainExactlyInAnyOrderOnly6 import io.kotest.matchers.collections.shouldContainInOrder7 import io.kotest.matchers.collections.shouldContainInOrderOnly8 import io.kotest.matchers.collections.shouldContainNone9 import io.kotest.matchers.collections.shouldContainSame10 import io.kotest.matchers.collections.shouldContainSameElementsAs11 import io.kotest.matchers.collections.shouldContainSameInOrderAs12 import io.kotest.matchers.collections.shouldHaveAtLeastSize13 import io.kotest.matchers.collections.shouldHaveAtMostSize14 import io.kotest.matchers.collections.shouldHaveSingleElement15 import io.kotest.matchers.collections.shouldHaveSize16 import io.kotest.matchers.collections.shouldHaveTheSameElementsAs17 import io.kotest.matchers.collections.shouldHaveTheSameElementsInOrderAs18 import io.kotest.matchers.collections.shouldNotContain19 import io.kotest.matchers.collections.shouldNotContainAll20 import io.kotest.matchers.collections.shouldNotContainExactly21 import io.kotest.matchers.collections.shouldNotContainExactlyInAnyOrder22 import io.kotest.matchers.collections.shouldNotContainExactlyInAnyOrderOnly23 import io.kotest.matchers.collections.shouldNotContainInOrder24 import io.kotest.matchers.collections.shouldNotContainInOrderOnly25 import io.kotest.matchers.collections.shouldNotContainNone26 import io.kotest.matchers.collections.shouldNotContainSame27 import io.kotest.matchers.collections.shouldNotContainSameElementsAs28 import io.kotest.matchers.collections.shouldNotContainSameInOrderAs29 import io.kotest.matchers.collections.shouldNotHaveAtLeastSize30 import io.kotest.matchers.collections.shouldNotHaveAtMostSize31 import io.kotest.matchers.collections.shouldNotHaveSingleElement32 import io.kotest.matchers.collections.shouldNotHaveSize33 import io.kotest.matchers.collections.shouldNotHaveTheSameElementsAs34 import io.k

Full Screen

Full Screen

increasing

Using AI Code Generation

copy

Full Screen

1 import io.kotest.matchers.collections.shouldContainAll2 import io.kotest.matchers.collections.shouldContainExactly3 import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder4 import io.kotest.matchers.collections.shouldContainExactlyInOrder5 import io.kotest.matchers.collections.shouldContainExactlyInOrderOnly6 import io.kotest.matchers.collections.shouldContainInOrder7 import io.kotest.matchers.collections.shouldContainInOrderOnly8 import io.kotest.matchers.collections.shouldContainSame9 import io.kotest.matchers.collections.shouldContainSize10 import io.kotest.matchers.collections.shouldContainSubset11 import io.kotest.matchers.collections.shouldContain12 import io.kotest.matchers.collections.shouldContainAllInAnyOrder13 import io.kotest.matchers.collections.shouldContainAllInOrder14 import io.kotest.matchers.collections.shouldContainAllInOrderOnly15 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnly16 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnlyNullsFirst17 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnlyNullsLast18 import io.kotest.matchers.collections.shouldContainAllInOrderOnlyNullsFirst19 import io.kotest.matchers.collections.shouldContainAllInOrderOnlyNullsLast20 import io.kotest.matchers.collections.shouldContainAllInOrderOnlyNullsFirst21 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnlyNullsLast22 import io.kotest.matchers.collections.shouldContainAllInOrderOnlyNullsFirst23 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnlyNullsLast24 import io.kotest.matchers.collections.shouldContainAllInOrderOnlyNullsFirst25 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnlyNullsLast26 import io.kotest.matchers.collections.shouldContainAllInOrderOnlyNullsFirst27 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnlyNullsLast28 import io.kotest.matchers.collections.shouldContainAllInOrderOnlyNullsFirst29 import io.kotest.matchers.collections.shouldContainAllInAnyOrderOnlyNullsLast30 import io.kotest.matchers

Full Screen

Full Screen

increasing

Using AI Code Generation

copy

Full Screen

1val result = listOf(1, 2, 3, 4, 5)2result.shouldContainAll(1, 2, 3)3result.shouldContainNone(6, 7, 8)4result.shouldContainExactly(1, 2, 3, 4, 5)5result.shouldContainExactlyInAnyOrder(5, 4, 3, 2, 1)6result.shouldContainInOrder(1, 2, 3)7result.shouldContainInOrderOnly(1, 2, 3, 4, 5)8result.shouldContainInOrderOnly(5, 4, 3, 2, 1)9result.shouldContainOnly(1, 2, 3, 4, 5)10result.shouldContainOnly(5, 4, 3, 2, 1)11result.shouldContainExactlyInAnyOrder(5, 4, 3, 2, 1)12result.shouldContainExactly(1, 2, 3, 4, 5)13result.shouldContainExactlyInAnyOrder(5, 4, 3, 2, 1)14result.shouldContainInOrder(1, 2, 3)15result.shouldContainInOrderOnly(1, 2, 3, 4, 5)16result.shouldContainInOrderOnly(5, 4, 3, 2, 1)17result.shouldContainOnly(1, 2, 3, 4, 5)18result.shouldContainOnly(5, 4, 3, 2, 1)19result.shouldContainExactlyInAnyOrder(5, 4, 3, 2, 1)20result.shouldContainExactly(1, 2, 3, 4, 5)21result.shouldContainExactlyInAnyOrder(5, 4, 3, 2, 1)22result.shouldContainInOrder(1, 2, 3)23result.shouldContainInOrderOnly(1, 2, 3, 4, 5)24result.shouldContainInOrderOnly(5, 4, 3, 2, 1)25result.shouldContainOnly(1, 2, 3, 4, 5)26result.shouldContainOnly(5, 4, 3, 2, 1)

Full Screen

Full Screen

increasing

Using AI Code Generation

copy

Full Screen

1import io.kotest.matchers.collections.shouldContainExactly2class MyTest : ShouldSpec({3"should contain exactly" {4val list = listOf(1, 2, 3, 4)5list shouldContainExactly listOf(1, 2, 3, 4)6}7})8import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder9class MyTest : ShouldSpec({10"should contain exactly in any order" {11val list = listOf(1, 2, 3, 4)12list shouldContainExactlyInAnyOrder listOf(4, 3, 2, 1)13}14})15import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder16class MyTest : ShouldSpec({17"should contain exactly in any order" {18val list = listOf(1, 2, 3, 4)19list shouldContainExactlyInAnyOrder listOf(4, 3, 2, 1)20}21})22import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder23class MyTest : ShouldSpec({24"should contain exactly in any order" {25val list = listOf(1, 2, 3, 4)26list shouldContainExactlyInAnyOrder listOf(4, 3, 2, 1)27}28})29import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder30class MyTest : ShouldSpec({31"should contain exactly in any order" {32val list = listOf(1, 2, 3, 4)33list shouldContainExactlyInAnyOrder listOf(4, 3, 2, 1)34}35})36import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder37class MyTest : ShouldSpec({38"should contain exactly in any order" {39val list = listOf(1, 2, 3, 4)40list shouldContainExactlyInAnyOrder listOf(4, 3, 2, 1)41}42})

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful