-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring after upgrading server dependencies
- Loading branch information
Showing
9 changed files
with
32 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
mangopay/api/src/main/scala/app/softnetwork/payment/api/MangoPayWithSchedulerRoutes.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package app.softnetwork.payment.api | ||
|
||
import akka.actor.typed.ActorSystem | ||
import akka.http.scaladsl.server.Route | ||
import app.softnetwork.api.server.ApiRoute | ||
import app.softnetwork.persistence.schema.SchemaProvider | ||
import app.softnetwork.scheduler.launch.SchedulerRoutes | ||
|
||
trait MangoPayWithSchedulerRoutes extends SchedulerRoutes with MangoPayRoutes { _: SchemaProvider => | ||
override def apiRoutes(system: ActorSystem[_]): Route = | ||
super.apiRoutes(system) ~ schedulerService(system).route | ||
override def apiRoutes: ActorSystem[_] => List[ApiRoute] = | ||
system => super.apiRoutes(system) :+ schedulerService(system) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
testkit/src/main/scala/app/softnetwork/payment/scalatest/PaymentRoutesTestKit.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
package app.softnetwork.payment.scalatest | ||
|
||
import akka.actor.typed.ActorSystem | ||
import akka.http.scaladsl.server.Route | ||
import app.softnetwork.api.server.ApiRoute | ||
import app.softnetwork.payment.launch.PaymentRoutes | ||
import app.softnetwork.payment.service.{GenericPaymentService, MockPaymentService} | ||
import app.softnetwork.persistence.schema.SchemaProvider | ||
import app.softnetwork.session.scalatest.SessionServiceRoute | ||
import app.softnetwork.session.scalatest.SessionServiceRoutes | ||
|
||
trait PaymentRoutesTestKit extends PaymentRoutes { _: SchemaProvider => | ||
trait PaymentRoutesTestKit extends PaymentRoutes with SessionServiceRoutes { _: SchemaProvider => | ||
|
||
override def paymentService: ActorSystem[_] => GenericPaymentService = system => | ||
MockPaymentService(system, sessionService(system)) | ||
|
||
override def apiRoutes(system: ActorSystem[_]): Route = | ||
paymentService(system).route ~ | ||
SessionServiceRoute(sessionService(system)).route | ||
override def apiRoutes: ActorSystem[_] => List[ApiRoute] = | ||
system => | ||
List( | ||
paymentService(system), | ||
sessionServiceRoute(system) | ||
) | ||
|
||
} |