diff --git a/server/src/test/scala/services/exports/FlightExportsSpec.scala b/server/src/test/scala/services/exports/FlightExportsSpec.scala index bac1c2f85..62ea8f56f 100644 --- a/server/src/test/scala/services/exports/FlightExportsSpec.scala +++ b/server/src/test/scala/services/exports/FlightExportsSpec.scala @@ -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 ) @@ -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 ) diff --git a/server/src/test/scala/services/exports/StreamingFlightsExportSpec.scala b/server/src/test/scala/services/exports/StreamingFlightsExportSpec.scala index 026943c23..5c60b3dd0 100644 --- a/server/src/test/scala/services/exports/StreamingFlightsExportSpec.scala +++ b/server/src/test/scala/services/exports/StreamingFlightsExportSpec.scala @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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