Skip to content

Commit

Permalink
DRTII-1675 Update tests for export output
Browse files Browse the repository at this point in the history
  • Loading branch information
richbirch committed Nov 20, 2024
1 parent b9f39e3 commit 24aeac3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions server/src/test/scala/services/exports/FlightExportsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class FlightExportsSpec extends CrunchTestLike {

val result = Await.result(csvStream.runWith(Sink.seq), 1.second)
val expected = List(
"""North,MAN,T1,BA0002,BA0002,JFK,/,Scheduled,2020-06-02 01:05,,,,,,,2020-06-02 01:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0001,BA0001,JFK,/,Scheduled,2020-06-01 21:00,,,,,,,2020-06-02 02:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0003,BA0003,JFK,/,Scheduled,2020-06-03 01:05,,,,,,,2020-06-02 23:55,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
"""North,MAN,T1,BA0002,T1,JFK,/,Scheduled,2020-06-02 01:05,,,,,,,2020-06-02 01:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0001,T1,JFK,/,Scheduled,2020-06-01 21:00,,,,,,,2020-06-02 02:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0003,T1,JFK,/,Scheduled,2020-06-03 01:05,,,,,,,2020-06-02 23:55,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|""".stripMargin
)

Expand All @@ -68,9 +68,9 @@ class FlightExportsSpec extends CrunchTestLike {

val result = Await.result(csvStream.runWith(Sink.seq), 1.second)
val expected = List(
"""North,MAN,T1,BA0002,BA0002,JFK,/,Scheduled,2020-06-02 01:05,,,,,,,2020-06-02 01:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0001,BA0001,JFK,/,Scheduled,2020-06-01 21:00,,,,,,,2020-06-02 02:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0003,BA0003,JFK,/,Scheduled,2020-06-03 01:05,,,,,,,2020-06-02 23:55,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
"""North,MAN,T1,BA0002,T1,JFK,/,Scheduled,2020-06-02 01:05,,,,,,,2020-06-02 01:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0001,T1,JFK,/,Scheduled,2020-06-01 21:00,,,,,,,2020-06-02 02:30,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|North,MAN,T1,BA0003,T1,JFK,/,Scheduled,2020-06-03 01:05,,,,,,,2020-06-02 23:55,100,95,95,,,,,,,,,,,,,,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,"",""
|""".stripMargin
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings
|SA0324,SA0324,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,98,98,Y,7,15,32,44,11,23,29,35,,,,
|SA0325,SA0325,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,
|SA0326,SA0326,JHD,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,
|SA0324,T1,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,98,98,Y,7,15,32,44,11,23,29,35,,,,
|SA0325,T1,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,
|SA0326,T1,JHD,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,
|""".stripMargin

result === expected
Expand Down Expand Up @@ -256,9 +256,9 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings
|SA0326,SA0326,JHD,/,Scheduled,2017-01-01 20:00,,,,,,,2017-01-01 20:00,n/a,,,,,,,,,,,,,,,
|SA0327,SA0327,JHD,/,Scheduled,2017-01-01 21:00,,,,,,,2017-01-01 21:00,n/a,,,,,,,,,,,,,,,
|SA0328,SA0328,JHD,/,Scheduled,2017-01-01 22:00,,,,,,,2017-01-01 22:00,n/a,,,,,,,,,,,,,,,
|SA0326,T1,JHD,/,Scheduled,2017-01-01 20:00,,,,,,,2017-01-01 20:00,n/a,,,,,,,,,,,,,,,
|SA0327,T1,JHD,/,Scheduled,2017-01-01 21:00,,,,,,,2017-01-01 21:00,n/a,,,,,,,,,,,,,,,
|SA0328,T1,JHD,/,Scheduled,2017-01-01 22:00,,,,,,,2017-01-01 22:00,n/a,,,,,,,,,,,,,,,
|""".stripMargin

result === expected
Expand All @@ -273,8 +273,8 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings
|SA0325,SA0325,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,
|SA0326,SA0326,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,105,105,105,Y,32,62,11,,,,,,,,,
|SA0325,T1,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,
|SA0326,T1,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,105,105,105,Y,32,62,11,,,,,,,,,
|""".stripMargin

result === expected
Expand All @@ -288,7 +288,7 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings
|SA0324,SA0324,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,98,98,Y,7,15,32,44,11,23,29,35,,,,
|SA0324,T1,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,98,98,Y,7,15,32,44,11,23,29,35,,,,
|""".stripMargin

result === expected
Expand Down Expand Up @@ -321,9 +321,9 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings,$actualApiHeadings
|SA0324,SA0324,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,28,28,,2,4,9,13,3,7,8,10,,,,,2.0,1.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.0,4.0,7.0,6.0,"",""
|SA0325,SA0325,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,,3.0,3.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,"",""
|SA0326,SA0326,JHD,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,,30,60,10,,,,,,,,,,30.0,30.0,30.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,10.0,0.0,0.0,"",""
|SA0324,T1,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,28,28,,2,4,9,13,3,7,8,10,,,,,2.0,1.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.0,4.0,7.0,6.0,"",""
|SA0325,T1,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,,3.0,3.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,"",""
|SA0326,T1,JHD,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,,30,60,10,,,,,,,,,,30.0,30.0,30.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,10.0,0.0,0.0,"",""
|""".stripMargin

result === expected
Expand All @@ -346,7 +346,7 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings,$actualApiHeadings
|SA0324,SA0324,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,98,98,Y,7,15,32,44,11,23,29,35,,,,,2.0,1.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.0,4.0,7.0,6.0,"FRA:2,GBR:1,USA:1","0-11:1,25-49:2,50-65:1"
|SA0324,T1,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,98,98,Y,7,15,32,44,11,23,29,35,,,,,2.0,1.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.0,4.0,7.0,6.0,"FRA:2,GBR:1,USA:1","0-11:1,25-49:2,50-65:1"
|""".stripMargin

result === expected
Expand All @@ -360,8 +360,8 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings,$actualApiHeadings
|SA0325,SA0325,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,,3.0,3.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,"",""
|SA0326,SA0326,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,105,105,105,Y,32,62,11,,,,,,,,,,30.0,30.0,30.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,10.0,0.0,0.0,"",""
|SA0325,T1,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,,3.0,3.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,"",""
|SA0326,T1,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,105,105,105,Y,32,62,11,,,,,,,,,,30.0,30.0,30.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,10.0,0.0,0.0,"",""
|""".stripMargin

result === expected
Expand All @@ -379,8 +379,8 @@ class StreamingFlightsExportSpec extends CrunchTestLike {

val expected =
s"""|$flightHeadings,$apiHeadings,$actualApiHeadings
|SA0325,SA0325,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,,3.0,3.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,"",""
|SA0326,SA0326,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,105,105,105,Y,32,62,11,,,,,,,,,,30.0,30.0,30.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,10.0,0.0,0.0,"",""
|SA0325,T1,JHC,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,100,100,100,Y,30,60,10,,,,,,,,,,3.0,3.0,3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,"",""
|SA0326,T1,JHB,/,Expected,2017-01-01 20:00,,2017-01-01 20:00,,,,,,105,105,105,Y,32,62,11,,,,,,,,,,30.0,30.0,30.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,10.0,0.0,0.0,"",""
|""".stripMargin

result === expected
Expand Down

0 comments on commit 24aeac3

Please sign in to comment.