This repository was archived by the owner on Mar 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
src/test/scala/reactor/core/scala/publisher Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2232,5 +2232,16 @@ class SFluxTest extends AnyFreeSpec with Matchers with TableDrivenPropertyChecks
22322232 " .asJava should convert to java" in {
22332233 SFlux .just(1 , 2 , 3 ).asJava() shouldBe a[reactor.core.publisher.Flux [_]]
22342234 }
2235+
2236+ " .asScala and .asJava should be" - {
2237+ val jFlux : JFlux [Int ] = JFlux .just(1 , 2 , 3 )
2238+ " compile" in {
2239+ // noinspection ScalaUnusedSymbol
2240+ " val x: JFlux[Int] = jFlux.asScala.asJava()" should compile
2241+ }
2242+ " symmetrical" in {
2243+ jFlux.asScala.asJava() should be theSameInstanceAs jFlux
2244+ }
2245+ }
22352246 }
22362247}
Original file line number Diff line number Diff line change @@ -366,6 +366,17 @@ class SMonoTest extends AnyFreeSpec with Matchers with TestSupport with Idiomati
366366 JMono .just(randomValue).asScala shouldBe an[SMono [_]]
367367 }
368368
369+ " .asScala and .asJava should be" - {
370+ val jMono : JMono [Long ] = JMono .just(randomValue)
371+ " compile" in {
372+ // noinspection ScalaUnusedSymbol
373+ " val x: JMono[Long] = jMono.asScala.asJava()" should compile
374+ }
375+ " symmetrical" in {
376+ jMono.asScala.asJava() should be theSameInstanceAs jMono
377+ }
378+ }
379+
369380 " .block" - {
370381 " should block the mono to get the value" in {
371382 just(randomValue).block() shouldBe randomValue
You can’t perform that action at this time.
0 commit comments