Skip to content

Commit 735fc8b

Browse files
committed
Reformat
1 parent 1bc051e commit 735fc8b

File tree

6 files changed

+28
-12
lines changed

6 files changed

+28
-12
lines changed

examples/akka-cluster-app/src/main/scala/org/virtuslab/example/ExampleSerializer.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import org.virtuslab.ash.circe.Register
88
import org.virtuslab.ash.circe.Registration
99

1010
@Serializer(classOf[CirceAkkaSerializable], Register.REGISTRATION_REGEX)
11-
class ExampleSerializer(actorSystem: ExtendedActorSystem) extends CirceAkkaSerializer[CirceAkkaSerializable](actorSystem) {
11+
class ExampleSerializer(actorSystem: ExtendedActorSystem)
12+
extends CirceAkkaSerializer[CirceAkkaSerializable](actorSystem) {
1213
override def identifier: Int = 2137
1314

1415
override lazy val codecs: Seq[Registration[_ <: CirceAkkaSerializable]] = Seq(

examples/akka-cluster-app/src/main/scala/org/virtuslab/example/StatsService.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ object StatsAggregator {
6868
waiting(replyTo, words.size, Nil)
6969
}
7070

71-
private def waiting(replyTo: ActorRef[StatsService.Response], expectedResponses: Int, results: List[Int]): Behavior[Event] =
71+
private def waiting(
72+
replyTo: ActorRef[StatsService.Response],
73+
expectedResponses: Int,
74+
results: List[Int]): Behavior[Event] =
7275
Behaviors.receiveMessage {
7376
case CalculationComplete(length) =>
7477
val newResults = results :+ length

examples/akka-persistence-app/src/main/scala/org/virtuslab/example/ExampleSerializer.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import org.virtuslab.ash.circe.Register
88
import org.virtuslab.ash.circe.Registration
99

1010
@Serializer(classOf[CirceAkkaSerializable], Register.REGISTRATION_REGEX)
11-
class ExampleSerializer(actorSystem: ExtendedActorSystem) extends CirceAkkaSerializer[CirceAkkaSerializable](actorSystem) {
11+
class ExampleSerializer(actorSystem: ExtendedActorSystem)
12+
extends CirceAkkaSerializer[CirceAkkaSerializable](actorSystem) {
1213
override def identifier: Int = 7312
1314

1415
override lazy val codecs: Seq[Registration[_ <: CirceAkkaSerializable]] = Seq(

examples/akka-persistence-app/src/main/scala/org/virtuslab/example/ShoppingCart.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ object ShoppingCart {
5151
/**
5252
* A command to add an item to the cart.
5353
*
54-
* It replies with `StatusReply[Summary]`, which is sent back to the caller when all the events emitted by this command are
55-
* successfully persisted.
54+
* It replies with `StatusReply[Summary]`, which is sent back to the caller when all the events emitted by this
55+
* command are successfully persisted.
5656
*/
5757
final case class AddItem(itemId: String, quantity: Int, replyTo: ActorRef[StatusReply[Summary]]) extends Command
5858

examples/akka-persistence-app/src/main/scala/org/virtuslab/example/repository/ScalikeJdbcSetup.scala

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import scalikejdbc.config.TypesafeConfigReader
1515
object ScalikeJdbcSetup {
1616

1717
/**
18-
* Initiate the ScalikeJDBC connection pool configuration and shutdown. The DataSource is setup with ActorSystem's config.
18+
* Initiate the ScalikeJDBC connection pool configuration and shutdown. The DataSource is setup with ActorSystem's
19+
* config.
1920
*
2021
* The connection pool will be closed when the actor system terminates.
2122
*/
@@ -28,8 +29,8 @@ object ScalikeJdbcSetup {
2829
}
2930

3031
/**
31-
* Builds a Hikari DataSource with values from jdbc-connection-settings. The DataSource is then configured as the 'default'
32-
* connection pool for ScalikeJDBC.
32+
* Builds a Hikari DataSource with values from jdbc-connection-settings. The DataSource is then configured as the
33+
* 'default' connection pool for ScalikeJDBC.
3334
*/
3435
private def initFromConfig(config: Config): Unit = {
3536

@@ -61,7 +62,11 @@ object ScalikeJdbcSetup {
6162
/**
6263
* This is only needed to allow ScalikeJdbc to load its logging configurations from the passed Config
6364
*/
64-
private class DBsFromConfig(val config: Config) extends DBs with TypesafeConfigReader with TypesafeConfig with NoEnvPrefix
65+
private class DBsFromConfig(val config: Config)
66+
extends DBs
67+
with TypesafeConfigReader
68+
with TypesafeConfig
69+
with NoEnvPrefix
6570

6671
/**
6772
* ScalikeJdbc needs a closer for the DataSource to delegate the closing call.

examples/akka-persistence-app/src/test/scala/org.virtuslab/example/ShoppingCartSpec.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,16 @@ object ShoppingCartSpec {
2323
.withFallback(EventSourcedBehaviorTestKit.config)
2424
}
2525

26-
class ShoppingCartSpec extends ScalaTestWithActorTestKit(ShoppingCartSpec.config) with AnyWordSpecLike with BeforeAndAfterEach {
26+
class ShoppingCartSpec
27+
extends ScalaTestWithActorTestKit(ShoppingCartSpec.config)
28+
with AnyWordSpecLike
29+
with BeforeAndAfterEach {
2730

2831
private val cartId = "testCart"
2932
private val eventSourcedTestKit =
30-
EventSourcedBehaviorTestKit[ShoppingCart.Command, ShoppingCart.Event, ShoppingCart.State](system, ShoppingCart(cartId))
33+
EventSourcedBehaviorTestKit[ShoppingCart.Command, ShoppingCart.Event, ShoppingCart.State](
34+
system,
35+
ShoppingCart(cartId))
3136

3237
override protected def beforeEach(): Unit = {
3338
super.beforeEach()
@@ -38,7 +43,8 @@ class ShoppingCartSpec extends ScalaTestWithActorTestKit(ShoppingCartSpec.config
3843

3944
"add item" in {
4045
val result1 =
41-
eventSourcedTestKit.runCommand[StatusReply[ShoppingCart.Summary]](replyTo => ShoppingCart.AddItem("foo", 42, replyTo))
46+
eventSourcedTestKit.runCommand[StatusReply[ShoppingCart.Summary]](replyTo =>
47+
ShoppingCart.AddItem("foo", 42, replyTo))
4248
result1.reply should ===(StatusReply.Success(ShoppingCart.Summary(Map("foo" -> 42))))
4349
result1.event should ===(ShoppingCart.ItemAdded(cartId, "foo", 42))
4450
}

0 commit comments

Comments
 (0)