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

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

ResourceTests.kt

Source:ResourceTests.kt Github

copy

Full Screen

1package org.kalasim.test2import io.kotest.matchers.collections.shouldBeEmpty3import io.kotest.matchers.maps.shouldBeEmpty4import io.kotest.matchers.shouldBe5import io.kotest.matchers.shouldNotBe6import org.apache.commons.math3.distribution.EnumeratedDistribution7import org.junit.Assert8import org.junit.Test9import org.kalasim.*10import org.kalasim.Priority.Companion.CRITICAL11import org.kalasim.Priority.Companion.IMPORTANT12import org.kalasim.Priority.Companion.LOW13import org.kalasim.Priority.Companion.LOWEST14import org.kalasim.Priority.Companion.NORMAL15import org.kalasim.ResourceSelectionPolicy.*16import java.time.Instant17import java.util.concurrent.TimeUnit18class ResourceTests {19 @Test20 fun `preemptive resources should bump claims`() {21 // see version 19.0.9 2019-10-08 in salabim change log for code snippets22 /**23 if the component has to start all over again (hold(1)) if it is bumped:24 def process(self):25 prio = sim.Pdf((1,2,3), 1)26 while True:27 yield self.request((preemptive_resource, 1, prio)28 yield self.hold(1)29 if self.isclaiming(preemptive_resource):30 break31 self.release(preemptive_resource)32 */33 createSimulation {34 val resource = Resource(preemptive = true)35 val prioPDF = EnumeratedDistribution(listOf(1, 2, 3).map { it to 1.0 / 3.0 }.asCMPairList())36 object : Component() {37 override fun process() = sequence {38 while(true) {39 request(resource withQuantity 1 andPriority Priority(prioPDF.sample()))40 hold(1)41 if(!isClaiming(resource)) {42 break43 } else {44 release(resource)45 }46 }47 }48 }49 }50 }51 @Test52 fun `it should release resourced when terminating`() = createTestSimulation(true) {53 // see bank office docs: By design resources that were claimed are automatically54 // released when a process terminates55 val resource = Resource()56 object : Component("foo") {57 override fun process() = sequence {58 request(resource)59 hold(1)60 log("finished process, terminating...")61 }62 }63 run(10)64 resource.claimers.size shouldBe 065 }66 @Test67 fun `preemptive resources should bump components depending on priority`() = createTestSimulation(true) {68 // see bank office docs: By design resources that were claimed are automatically69 // released when a process terminates70 val resource = Resource("repair", preemptive = true, capacity = 2)71 class BumpComponent(72 name: String,73 val preRequestHold: Int,74 val postRequestHold: Int,75 val requestPriority: Int? = null,76 val failOnBump: Boolean = false77 ) : Component(name) {78 override fun process() = sequence {79 hold(preRequestHold)80 if(requestPriority != null) {81 request(resource withPriority requestPriority)82 } else {83 request(resource)84 }85 hold(postRequestHold)86 if(isBumped(resource)) {87 log("got bumped from $resource")88 if(failOnBump) Assert.fail()89 return@sequence90 }91 log("finished process, terminating...")92 }93 }94 val tpTool = BumpComponent("top-prio tool", 0, 100, requestPriority = 100)95 val lpTool = BumpComponent("low-prio tool", 0, 5)96 val mpTool = BumpComponent("mid-prio tool", 10, 5)97 val hpTool = BumpComponent("high-prio tool", 11, 5, requestPriority = 3)98 val hpTool2 = BumpComponent("high-prio tool 2", 12, 5, requestPriority = 3)99 run(10)100 // it should have auto-release the resource by now101 resource.claimers.size shouldBe 1102 lpTool.isRequesting shouldBe false103 lpTool.isData shouldBe true104 lpTool.requests.shouldBeEmpty()105 run(5)106 // at this point hp-tool should have bumped mpTool107 mpTool.isBumped(resource) shouldBe true108 mpTool.isData shouldBe true109 hpTool.isScheduled shouldBe true110 hpTool2.isRequesting shouldBe true111 resource.requesters.contains(hpTool2) shouldBe true112 resource.claimers.contains(hpTool) shouldBe true113 run(5)114 hpTool.isData shouldBe true115 hpTool2.isScheduled shouldBe true116 resource.requesters.size shouldBe 0117 resource.claimers.contains(hpTool2) shouldBe true118 resource.claimers.contains(tpTool) shouldBe true119 resource.claimers.size shouldBe 2120 }121 @Test122 fun `null prio requests should not bump each other`() = createTestSimulation(true) {123 val r = Resource(preemptive = true)124 class BumpComponent : Component() {125 override fun process() = sequence {126 request(r)127 hold(5)128 log("finished process, terminating...")129 }130 }131 val bc1 = BumpComponent()132 val bc2 = BumpComponent()133 run(3)134 bc1.isScheduled shouldBe true135 bc2.isRequesting shouldBe true136 }137 @Test138 fun `it should not bump regular non-preemptive resources`() = createTestSimulation(true) {139 val r = Resource()140 class BumpComponent : Component() {141 override fun process() = sequence {142 request(r)143 hold(5)144 log("finished process, terminating...")145 }146 }147 val bc1 = BumpComponent()148 val bc2 = BumpComponent()149 run(8)150 bc1.isData shouldBe true151 bc2.isScheduled shouldBe true152 }153 @Test154 fun `it should respect request priorities`() = createTestSimulation {155 val r = Resource(capacity = 2)156 val results = mutableListOf<Priority?>()157 class PrioComponent(val wait: Number, val claim: Number, val prio: Priority? = null) : Component() {158 override fun process() = sequence {159 hold(wait)160 request(ResourceRequest(r, priority = prio)) {161 results.add(prio)162 hold(claim)163 }164 }165 }166 PrioComponent(1, 20, null)167 PrioComponent(2, 20, null)168 PrioComponent(3, 20, null)169 PrioComponent(4, 20, null)170 PrioComponent(5, 20, IMPORTANT)171 PrioComponent(6, 20, LOWEST)172 PrioComponent(7, 20, LOW)173 PrioComponent(8, 20, NORMAL)174 PrioComponent(9, 20, CRITICAL)175 // make sure that we can extract correctly sorted copy of the request queue176 run(10)177 r.requesters.asSortedList().map {178 it.component.name.substringAfterLast(".").toInt()179 } shouldBe listOf(9, 5, 3, 4, 8, 7, 6)180 run()181 results shouldBe listOf(null, null, CRITICAL, IMPORTANT, null, null, NORMAL, LOW, LOWEST)182 }183 @Test184 fun `it should respect request priorities when mixing request sizes`() = createTestSimulation(true) {185 val resource = Resource(capacity = 2)186 object : Component("earlyConsumer") {187 override fun process() = sequence {188 hold(duration = 5.0)189 request(resource) {190 hold(duration = 5.0)191 }192 }193 }194 var criticalRequestHonored = false195 object : Component("big_consumer") {196 override fun process() = sequence {197 hold(duration = 7.0)198 request(resource withQuantity 2 andPriority Priority.CRITICAL) {199 criticalRequestHonored = true200 hold(duration = 5.0, "consumed complete resource")201 }202 }203 }204 object : Component("lateConsumer") {205 override fun process() = sequence {206 hold(duration = 10.0)207 request(resource) {208 criticalRequestHonored shouldBe true // because it should be honoured after the big consumer209 hold(duration = 5.0, "late consumption")210 }211 }212 }213 run()214 criticalRequestHonored shouldBe true215 }216 @Test217 fun `it should reevaluate requests upon capacity changes`() {218 class Customer(val clerk: Resource) : Component() {219 override fun process() = sequence {220 hold(duration = 5.0)221 request(clerk, capacityLimitMode = CapacityLimitMode.SCHEDULE)222 hold(duration = 2.0, priority = IMPORTANT)223 release(clerk)224 passivate()225 hold(duration = 5.0)226 }227 }228 createSimulation {229 val clerk = Resource(capacity = 0)230 val customer = Customer(clerk)231 run(8)232 clerk.capacity = 1.0233 run(10)234 customer.activate()235// sequence<Component>{236// with(customer){237// hold(3)238// }239// }.toList()240 run(10)241 // how long was the component in passive state242 customer.statusTimeline.printHistogram()243// println(customer.statusTimeline[ComponentState.PASSIVE])244 customer.statusTimeline.total(ComponentState.PASSIVE) shouldBe 8.0245 }246 }247 @Test248 fun `it should auto-release resources in builder`() {249 createSimulation(true) {250 val r = Resource()251 object : Component() {252 override fun process() = sequence {253 hold(2)254 request(ResourceRequest(r)) {255 hold(1)256 }257 }258 }259 println(toString())260 run(5)261 println(toString())262 r.claimers.isEmpty() shouldBe true263 r.requesters.isEmpty() shouldBe true264 }265 }266 @Test267 fun `it should report correct resource in honor block when using oneOf mode`() = createTestSimulation {268 val r1 = Resource(capacity = 3)269 val r2 = Resource(capacity = 3)270 val r3 = Resource(capacity = 3)271 var honorBlockReached = false272 object : Component() {273 override fun process() = sequence {274 request(r2 withQuantity 2)275 request(r1) {276 request(r2) {277 request(r2, r3, oneOf = true) { (r, _) ->278 r shouldBe r3279 println("honor block")280 honorBlockReached = true281 }282 }283 }284 }285 }286 run(1)287 honorBlockReached shouldBe true288 }289 @Test290 fun `it should be possible to use nested requests on the same resource`() = createTestSimulation {291 val r1 = Resource(capacity = 4)292 object : Component() {293 override fun process() = sequence {294 request(r1) {295 request(r1) {296 request(r1) {297 hold(1)298 }299 r1.claimed shouldBe 2300 r1.claimers.size shouldBe 1301 }302 r1.claimed shouldBe 0303 }304 }305 }306 run(1)307 }308 @Test309 fun `it should track request scoped activities`() = createTestSimulation {310 val r1 = Resource(capacity = 4)311 val r2 = Resource(capacity = 4)312 object : Component() {313 override fun process() = sequence {314 request(r1)315 hold(100)316 release(r1)317 }318 }319 object : Component() {320 override fun process() = sequence {321 hold(3)322 request(r2) {323 hold(1)324 request(r1, description = "foo") {325 hold(2)326 r1.claimed shouldBe 2327 }328 hold(1)329 }330 }331 }332 run(10)333 r1.activities.apply {334 size shouldBe 1335 first().requested.value shouldBe 4.0336 first().released.value shouldBe 6.0337 first().activity shouldBe "foo"338 }339 // also test timeline api here340 val timeline = r1.timeline341 // We should make sure that only actual changes are tracked (e.g. not same capacity value twice342 timeline.filter { it.metric == ResourceMetric.Capacity }.size shouldBe 2343 timeline.size shouldBe 28344 // now set the tick-transform and check if the timeline includes walltime345 tickTransform = OffsetTransform(offset = Instant.parse("2021-01-01T00:00:00.00Z"), tickUnit = TimeUnit.MINUTES)346 val timelineWT = r1.timeline347 timelineWT.first().startWT shouldNotBe null348 }349 @Test350 fun `it should correctly set failed after timeout`() {351 createSimulation(true) {352 val r = Resource(capacity = 1)353 val dr = Resource(capacity = 1)354 val c = object : Component() {355 override fun process() = sequence {356 request(r)357 request(dr)358 //now try again but since both resources are busy/depleted it should fail359 // irrespective of the delay or time360 request(r, failDelay = 0)361 failed shouldBe true362 request(dr, failDelay = 0)363 failed shouldBe true364 request(r, failDelay = 1)365 failed shouldBe true366 request(dr, failDelay = 1)367 failed shouldBe true368 request(r, failAt = now + 1)369 failed shouldBe true370 request(dr, failAt = now + 1)371 failed shouldBe true372 }373 }374 run(5)375 println(toString())376 r.claimers.isEmpty() shouldBe true377 r.requesters.isEmpty() shouldBe true378 dr.claimers.isEmpty() shouldBe true379 dr.requesters.isEmpty() shouldBe true380 c.requests.shouldBeEmpty()381 c.componentState shouldBe ComponentState.DATA382 }383 }384 @Test385 fun `it should correctly handle oneOf requests`() = createTestSimulation {386 class DoctorMeier : Resource()387 class DoctorSchreier : Resource()388 val doctors: List<Resource> = listOf(DoctorMeier(), DoctorSchreier())389 val patient = object : Component() {390 override fun process() = sequence {391 request(doctors, oneOf = true) {392 hold(1)393 }394 }395 }396 run(10)397 doctors.forEach { dr ->398 dr.requesters.q.shouldBeEmpty()399 dr.claimers.q.shouldBeEmpty()400 }401 patient.componentState shouldBe ComponentState.DATA402 }403}404class ResourceSelectionTests {405 @Test406 fun `it should allow to select with FIRST_AVAILBLE`() = createTestSimulation(true) {407 val resources = List(3) { Resource().apply { capacity = 0.0 } }408 object : Component() {409 override fun process() = sequence {410 val r = selectResource(resources, policy = FirstAvailable)411 r shouldBe resources[1]412 }413 }414 run(3)415 resources[1].capacity = 3.0416 run(3)417 }418 @Test419 fun `it should allow to select with ShortestQueue`() = createTestSimulation(true) {420 val resources = List(3) { Resource() }421 class ResourceConsumer(val resource: Resource) : Component() {422 override fun process() = sequence {423 request(resource) { hold(10) }424 }425 }426 repeat(10) { ResourceConsumer(resources[0]) }427 repeat(3) { ResourceConsumer(resources[1]) }428 repeat(20) { ResourceConsumer(resources[2]) }429 object : Component() {430 override fun process() = sequence {431 val r = selectResource(resources, policy = ShortestQueue)432 r shouldBe resources[1]433 }434 }435 run(3)436 resources[1].capacity = 3.0437 run(3)438 }439 @Test440 fun `it should allow to select with RoundRobin`() = createTestSimulation(true) {441 val resources = List(3) { Resource() }442 val c = object : Component() {443 val obtainedResources = mutableListOf<Resource>()444 override fun process() = sequence {445 repeat(9) {446 val r = selectResource(resources, policy = RoundRobin)447 request(r) {448 hold(1)449 }450 obtainedResources.add(r)451 }452 }453 }454 run(20)455 c.obtainedResources shouldBe (resources + resources + resources)456 }457}...

Full Screen

Full Screen

SchemaSpec.kt

Source:SchemaSpec.kt Github

copy

Full Screen

1/*2 * Copyright 2021 https://github.com/openapi-processor/openapi-parser3 * PDX-License-Identifier: Apache-2.04 */5package io.openapiparser.model.v3x6import io.kotest.core.spec.style.StringSpec7import io.kotest.matchers.booleans.shouldBeFalse8import io.kotest.matchers.booleans.shouldBeTrue9import io.kotest.matchers.collections.shouldBeEmpty10import io.kotest.matchers.collections.shouldContainExactly11import io.kotest.matchers.maps.shouldBeEmpty12import io.kotest.matchers.nulls.shouldBeNull13import io.kotest.matchers.nulls.shouldNotBeNull14import io.kotest.matchers.shouldBe15import io.openapiparser.model.v30.schema as schema3016import io.openapiparser.model.v31.schema as schema3117class SchemaSpec: StringSpec({18 // json schema19 "gets schema multipleOf" {20 schema30("multipleOf: 9.9").multipleOf shouldBe 9.921 schema31("multipleOf: 9.9").multipleOf shouldBe 9.922 }23 "gets schema multipleOf is null if missing" {24 schema30().multipleOf.shouldBeNull()25 schema31().multipleOf.shouldBeNull()26 }27 "gets schema maximum" {28 schema30("maximum: 9.9").maximum shouldBe 9.929 schema31("maximum: 9.9").maximum shouldBe 9.930 }31 "gets schema maximum is null if missing" {32 schema30().maximum.shouldBeNull()33 schema31().maximum.shouldBeNull()34 }35 "gets schema exclusiveMaximum" {36 schema30("exclusiveMaximum: true").exclusiveMaximum.shouldBeTrue()37 schema31("exclusiveMaximum: true").exclusiveMaximum.shouldBeTrue()38 }39 "gets schema exclusiveMaximum is false if missing" {40 schema30().exclusiveMaximum.shouldBeFalse()41 schema31().exclusiveMaximum.shouldBeFalse()42 }43 "gets schema minimum" {44 schema30("minimum: 9.9").minimum shouldBe 9.945 schema31("minimum: 9.9").minimum shouldBe 9.946 }47 "gets schema minimum is null if missing" {48 schema30().minimum.shouldBeNull()49 schema31().minimum.shouldBeNull()50 }51 "gets schema exclusiveMinimum" {52 schema30("exclusiveMinimum: true").exclusiveMinimum.shouldBeTrue()53 schema31("exclusiveMinimum: true").exclusiveMinimum.shouldBeTrue()54 }55 "gets schema exclusiveMinimum is false if missing" {56 schema30().exclusiveMinimum.shouldBeFalse()57 schema31().exclusiveMinimum.shouldBeFalse()58 }59 "gets schema maxLength" {60 schema30("maxLength: 9").maxLength shouldBe 961 schema31("maxLength: 9").maxLength shouldBe 962 }63 "gets schema maxLength is null if missing" {64 schema30().maxLength.shouldBeNull()65 schema31().maxLength.shouldBeNull()66 }67 "gets schema minLength" {68 schema30("minLength: 9").minLength shouldBe 969 schema31("minLength: 9").minLength shouldBe 970 }71 "gets schema minLength is null if missing" {72 schema30().minLength.shouldBeNull()73 schema31().minLength.shouldBeNull()74 }75 "gets schema pattern" {76 schema30("pattern: regex").pattern shouldBe "regex"77 schema31("pattern: regex").pattern shouldBe "regex"78 }79 "gets schema pattern is null if missing" {80 schema30().pattern.shouldBeNull()81 schema31().pattern.shouldBeNull()82 }83 "gets schema minItems" {84 schema30("minItems: 9").minItems shouldBe 985 schema31("minItems: 9").minItems shouldBe 986 }87 "gets schema minItems is 0 if missing" {88 schema30().minItems shouldBe 089 schema31().minItems shouldBe 090 }91 "gets schema maxItems" {92 schema30("maxItems: 9").maxItems shouldBe 993 schema31("maxItems: 9").maxItems shouldBe 994 }95 "gets schema maxItems is null if missing" {96 schema30().maxItems.shouldBeNull()97 schema31().maxItems.shouldBeNull()98 }99 "gets schema uniqueItems" {100 schema30("uniqueItems: true").uniqueItems.shouldBeTrue()101 schema31("uniqueItems: true").uniqueItems.shouldBeTrue()102 }103 "gets schema uniqueItems is false if missing" {104 schema30().uniqueItems.shouldBeFalse()105 schema31().uniqueItems.shouldBeFalse()106 }107 "gets schema minProperties" {108 schema30("minProperties: 9").minProperties shouldBe 9109 schema31("minProperties: 9").minProperties shouldBe 9110 }111 "gets schema minProperties is 0 if missing" {112 schema30().minProperties shouldBe 0113 schema31().minProperties shouldBe 0114 }115 "gets schema maxProperties" {116 schema30("maxProperties: 9").maxProperties shouldBe 9117 schema31("maxProperties: 9").maxProperties shouldBe 9118 }119 "gets schema maxProperties is null if missing" {120 schema30().maxProperties.shouldBeNull()121 schema31().maxProperties.shouldBeNull()122 }123 "gets schema required" {124 schema30("required: [foo, bar]").required.shouldContainExactly(listOf("foo", "bar"))125 schema31("required: [foo, bar]").required.shouldContainExactly(listOf("foo", "bar"))126 }127 "gets schema required is empty if missing" {128 schema30().required.shouldBeEmpty()129 schema31().required.shouldBeEmpty()130 }131 "gets schema format" {132 schema30("format: foo").format shouldBe "foo"133 schema31("format: foo").format shouldBe "foo"134 }135 "gets schema format is null if missing" {136 schema30().format.shouldBeNull()137 schema31().format.shouldBeNull()138 }139 "gets schema enum" {140 schema30("enum: [foo, bar]").enum shouldBe listOf("foo", "bar")141 schema31("enum: [foo, bar]").enum shouldBe listOf("foo", "bar")142 }143 "gets schema enum is null if missing" {144 schema30().enum.shouldBeNull()145 schema31().enum.shouldBeNull()146 }147 "gets schema title" {148 schema30("title: foo").title shouldBe "foo"149 schema31("title: foo").title shouldBe "foo"150 }151 "gets schema title is null if missing" {152 schema30().title.shouldBeNull()153 schema31().title.shouldBeNull()154 }155 include(testDescription("schema 30", ::schema30) { it.description })156 include(testDescription("schema 31", ::schema31) { it.description })157 "gets schema default" {158 schema30("default: {}").default.shouldNotBeNull()159 schema31("default: {}").default.shouldNotBeNull()160 }161 "gets schema default is null if missing" {162 schema30().default.shouldBeNull()163 schema31().default.shouldBeNull()164 }165 "gets schema deprecated" {166 schema30("deprecated: true").deprecated.shouldBeTrue()167 schema31("deprecated: true").deprecated.shouldBeTrue()168 }169 "gets schema deprecated is false if missing" {170 schema30().deprecated.shouldBeFalse()171 schema31().deprecated.shouldBeFalse()172 }173 "gets schema properties" {174 val source = """175 properties:176 foo: {}177 bar: {}178 """179 val p30 = schema30(source).properties180 p30.size shouldBe 2181 p30["foo"].shouldNotBeNull()182 p30["bar"].shouldNotBeNull()183 val p31 = schema31(source).properties184 p31.size shouldBe 2185 p31["foo"].shouldNotBeNull()186 p31["bar"].shouldNotBeNull()187 }188 "gets schema properties is empty if missing" {189 schema30().properties.shouldBeEmpty()190 schema31().properties.shouldBeEmpty()191 }192 "gets schema items" () {193 schema30("items: {}").items.shouldNotBeNull()194 schema31("items: {}").items.shouldNotBeNull()195 }196 "gets schema items is null if missing" () {197 schema30().items.shouldBeNull()198 schema31().items.shouldBeNull()199 }200 "gets schema allOf" {201 schema30("allOf: [{}]").allOf.size shouldBe 1202 schema31("allOf: [{}]").allOf.size shouldBe 1203 }204 "gets schema allOf is empty if missing" {205 schema30().allOf.shouldBeEmpty()206 schema31().allOf.shouldBeEmpty()207 }208 "gets schema anyOf" {209 schema30("anyOf: [{}]").anyOf.size shouldBe 1210 schema31("anyOf: [{}]").anyOf.size shouldBe 1211 }212 "gets schema anyOf is empty if missing" {213 schema30().anyOf.shouldBeEmpty()214 schema31().anyOf.shouldBeEmpty()215 }216 "gets schema oneOf" {217 schema30("oneOf: [{}]").oneOf.size shouldBe 1218 schema31("oneOf: [{}]").oneOf.size shouldBe 1219 }220 "gets schema oneOf is empty if missing" {221 schema30().oneOf.shouldBeEmpty()222 schema31().oneOf.shouldBeEmpty()223 }224 "gets schema not" () {225 schema30("not: {}").not.shouldNotBeNull()226 schema31("not: {}").not.shouldNotBeNull()227 }228 "gets schema not is null if missing" () {229 schema30().not.shouldBeNull()230 schema31().not.shouldBeNull()231 }232 "gets schema readOnly" {233 schema30("readOnly: true").readOnly.shouldBeTrue()234 schema31("readOnly: true").readOnly.shouldBeTrue()235 }236 "gets schema readOnly is false if missing" {237 schema30().readOnly.shouldBeFalse()238 schema31().readOnly.shouldBeFalse()239 }240 "gets schema writeOnly" {241 schema30("writeOnly: true").writeOnly.shouldBeTrue()242 schema31("writeOnly: true").writeOnly.shouldBeTrue()243 }244 "gets schema writeOnly is false if missing" {245 schema30().writeOnly.shouldBeFalse()246 schema31().writeOnly.shouldBeFalse()247 }248 "gets schema externalDocs" {249 schema30("externalDocs: {}").externalDocs.shouldNotBeNull()250 schema31("externalDocs: {}").externalDocs.shouldNotBeNull()251 }252 "gets schema externalDocs is null if missing" {253 schema30().externalDocs.shouldBeNull()254 schema31().externalDocs.shouldBeNull()255 }256 @Suppress("DEPRECATION")257 "gets schema example" {258 schema30("example: {}").example.shouldNotBeNull()259 schema31("example: {}").example.shouldNotBeNull()260 }261 @Suppress("DEPRECATION")262 "gets schema example is null if missing" {263 schema30().example.shouldBeNull()264 schema31().example.shouldBeNull()265 }266 "gets schema discriminator" {267 schema30("discriminator: {}").discriminator.shouldNotBeNull()268 schema31("discriminator: {}").discriminator.shouldNotBeNull()269 }270 "gets schema discriminator is null if missing" {271 schema30().discriminator.shouldBeNull()272 schema31().discriminator.shouldBeNull()273 }274 "gets schema xml" {275 schema30("xml: {}").xml.shouldNotBeNull()276 schema31("xml: {}").xml.shouldNotBeNull()277 }278 "gets schema xml is null if missing" {279 schema30().xml.shouldBeNull()280 schema31().xml.shouldBeNull()281 }282 include(testExtensions("schema 30", ::schema30) { it.extensions })283 include(testExtensions("schema 31", ::schema31) { it.extensions })284})...

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.

Run Kotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in oneof

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful