Skip to content

Commit 2bb2a24

Browse files
committed
Demo filings start in NotStarted status
Realistic values for demo data will help prevent inconsistencies in smoke testing environments
1 parent 07df19a commit 2bb2a24

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
2017|6999998|in-progress|true|1484842271000|1487520671000
2-
2017|6999999|not-started|false|1484842271000|1484842271000
3-
2016|6999999|not-started|false|1484842271000|1484842271000
1+
2017|6999998|true|1484842271000|1487520671000
2+
2017|6999999|false|1484842271000|1484842271000
3+
2016|6999999|false|1484842271000|1484842271000

persistence/src/main/scala/hmda/persistence/demo/DemoFilings.scala

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,19 @@ object DemoFilings extends ResourceUtils {
1212
val values = line.split('|').map(_.trim)
1313
val period = values(0)
1414
val institutionId = values(1)
15-
val filingStatus = toFilingStatus(values(2))
16-
val filingRequired = values(3).toBoolean
17-
val start = values(4).toLong
18-
val end = values(5).toLong
15+
val filingRequired = values(2).toBoolean
16+
val start = values(3).toLong
17+
val end = values(4).toLong
1918

2019
Filing(
2120
period,
2221
institutionId,
23-
filingStatus,
22+
NotStarted,
2423
filingRequired,
2524
start,
2625
end
2726
)
2827
}.toSeq
2928
}
3029

31-
def toFilingStatus(text: String): FilingStatus = {
32-
text match {
33-
case "not-started" => NotStarted
34-
case "in-progress" => InProgress
35-
case "completed" => Completed
36-
case "cancelled" => Cancelled
37-
}
38-
}
39-
4030
}

0 commit comments

Comments
 (0)