Skip to content

Commit 2d9d372

Browse files
committed
DLS-11449: Reformatting
1 parent 8e1096e commit 2d9d372

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

app/uk/gov/hmrc/helptosaveapi/connectors/HelpToSaveConnector.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class HelpToSaveConnectorImpl @Inject() (config: Configuration, http: HttpClient
8989
override def createAccount(body: CreateAccountBody, correlationId: UUID, clientCode: String, eligibilityReason: Int)(
9090
implicit hc: HeaderCarrier,
9191
ec: ExecutionContext
92-
): Future[HttpResponse]= {
92+
): Future[HttpResponse] = {
9393
val reqBody = CreateAccountInfo(body, eligibilityReason, clientCode)
9494
val headers: (String, String) = s"$correlationIdHeaderName" -> s"$correlationId"
9595
http

build.sbt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ val appName = "help-to-save-api"
55
lazy val microservice = Project(appName, file("."))
66
.enablePlugins(play.sbt.PlayScala, SbtDistributablesPlugin)
77
.disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427
8-
.settings(CodeCoverageSettings.settings :_*)
8+
.settings(CodeCoverageSettings.settings *)
99
.settings(onLoadMessage := "")
1010
.settings(majorVersion := 2)
1111
.settings(scalaVersion := "2.13.12")
@@ -18,9 +18,20 @@ lazy val microservice = Project(appName, file("."))
1818
.settings(scalafmtOnCompile := true)
1919
.settings(libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test())
2020
// Disable default sbt Test options (might change with new versions of bootstrap)
21-
.settings(Test / testOptions -= Tests.Argument("-o", "-u", "target/test-reports", "-h", "target/test-reports/html-report"))
21+
.settings(
22+
Test / testOptions -= Tests.Argument("-o", "-u", "target/test-reports", "-h", "target/test-reports/html-report")
23+
)
2224
// Suppress successful events in Scalatest in standard output (-o)
2325
// Options described here: https://www.scalatest.org/user_guide/using_scalatest_with_sbt
24-
.settings(Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oNCHPQR", "-u", "target/test-reports", "-h", "target/test-reports/html-report"))
26+
.settings(
27+
Test / testOptions += Tests.Argument(
28+
TestFrameworks.ScalaTest,
29+
"-oNCHPQR",
30+
"-u",
31+
"target/test-reports",
32+
"-h",
33+
"target/test-reports/html-report"
34+
)
35+
)
2536

2637
libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

project/AppDependencies.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import play.sbt.PlayImport.ws
2-
import sbt._
2+
import sbt.*
33

44
object AppDependencies {
55
val hmrc = "uk.gov.hmrc"
@@ -16,11 +16,11 @@ object AppDependencies {
1616
)
1717

1818
def test(scope: String = "test"): Seq[ModuleID] = Seq(
19-
hmrc %% "stub-data-generator" % "1.1.0" % scope,
20-
"uk.gov.hmrc.mongo" %% s"hmrc-mongo-test-$playVersion" % hmrcMongoVersion % scope,
21-
"uk.gov.hmrc" %% s"bootstrap-test-$playVersion" % hmrcBootstrapVersion % scope,
22-
"org.mockito" %% "mockito-scala" % "1.17.30" % scope,
23-
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.18.0" % scope,
24-
"com.github.tomakehurst" % "wiremock" % "3.0.0-beta-7" % scope
19+
hmrc %% "stub-data-generator" % "1.1.0" % scope,
20+
"uk.gov.hmrc.mongo" %% s"hmrc-mongo-test-$playVersion" % hmrcMongoVersion % scope,
21+
"uk.gov.hmrc" %% s"bootstrap-test-$playVersion" % hmrcBootstrapVersion % scope,
22+
"org.mockito" %% "mockito-scala" % "1.17.30" % scope,
23+
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.18.0" % scope,
24+
"com.github.tomakehurst" % "wiremock" % "3.0.0-beta-7" % scope
2525
)
2626
}

test/uk/gov/hmrc/helptosaveapi/connectors/HelpToSaveConnectorImplSpec.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class HelpToSaveConnectorImplSpec
154154
when(
155155
method = GET,
156156
uri = getAccountUrl,
157-
headers= headers
157+
headers = headers
158158
).thenReturn(httpResponse.status, httpResponse.body)
159159
val result = await(connector.getAccount(nino, systemId, correlationId))
160160
result.status shouldBe 200
@@ -198,12 +198,8 @@ class HelpToSaveConnectorImplSpec
198198
"return http response when it calling getUserEnrolmentStatus" in {
199199
val enrollmentStatusUrl = "/help-to-save/enrolment-status"
200200
val httpResponse = HttpResponse(200, "")
201-
when(GET,
202-
enrollmentStatusUrl,
203-
Map("nino" -> nino),
204-
headers
205-
).thenReturn(httpResponse.status, httpResponse.body)
206-
val result = await(connector.getUserEnrolmentStatus(nino,correlationId))
201+
when(GET, enrollmentStatusUrl, Map("nino" -> nino), headers).thenReturn(httpResponse.status, httpResponse.body)
202+
val result = await(connector.getUserEnrolmentStatus(nino, correlationId))
207203
result.status shouldBe 200
208204
}
209205
}

0 commit comments

Comments
 (0)