Skip to content

Commit

Permalink
Removed implementation of IOApp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakky54 committed Dec 19, 2024
1 parent 7269c24 commit d8b5c3e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package nl.altindag.client.service

import cats.effect.{ExitCode, IO, IOApp, Resource}
import cats.effect.{IO, Resource}
import nl.altindag.client.ClientType
import nl.altindag.client.ClientType.HTTP4S_BLAZE_CLIENT
import nl.altindag.ssl.SSLFactory
Expand All @@ -33,7 +33,7 @@ class Http4sBlazeClientService(@Qualifier("blazeClient") client: Resource[IO, Cl
}

@Component
class BlazeClientConfiguration extends IOApp {
class BlazeClientConfiguration {

@Bean(name = Array("blazeClient"))
def createBlazeClient(sslFactory: SSLFactory): Resource[IO, Client[IO]] = {
Expand All @@ -42,6 +42,4 @@ class BlazeClientConfiguration extends IOApp {
.resource
}

override def run(args: List[String]): IO[ExitCode] = null

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package nl.altindag.client.service

import cats.effect.{ExitCode, IO, IOApp, Resource}
import cats.effect.{IO, Resource}
import nl.altindag.client.ClientType
import nl.altindag.client.ClientType.HTTP4S_JAVA_NET_CLIENT
import nl.altindag.ssl.SSLFactory
Expand All @@ -32,7 +32,7 @@ class Http4sJavaNetClientService(@Qualifier("javaNetClient") client: Resource[IO
}

@Component
class JavaNetClientConfiguration extends IOApp {
class JavaNetClientConfiguration {

@Bean(name = Array("javaNetClient"))
def createJavaNetClient(sslFactory: SSLFactory): Resource[IO, Client[IO]] = {
Expand All @@ -42,6 +42,4 @@ class JavaNetClientConfiguration extends IOApp {
.resource
}

override def run(args: List[String]): IO[ExitCode] = null

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,4 @@ class Http4sBlazeClientServiceShould extends AnyFunSpec with MockitoSugar {
verify(sslFactory, times(1)).getSslContext
}

describe("blaze io app run function should do nothing") {
val any = new BlazeClientConfiguration().run(null)
assertThat(any).isNull()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,4 @@ class Http4sJavaNetClientServiceShould extends AnyFunSpec with MockitoSugar {
verify(sslFactory, times(1)).getHostnameVerifier
}

describe("java net io app run function should do nothing") {
val any = new JavaNetClientConfiguration().run(null)
assertThat(any).isNull()
}

}

0 comments on commit d8b5c3e

Please sign in to comment.