testing2/danube_test2.scala
changeset 211 092e0879a5ae
child 284 9a04eb6a2291
equal deleted inserted replaced
210:63a1376cbebd 211:092e0879a5ae
       
     1 
       
     2 import io.Source
       
     3 import scala.util._
       
     4 
       
     5 def urban_get_csv_file(name: String) : List[String] = {
       
     6   val csv = Source.fromFile(name)
       
     7   csv.mkString.split("\n").toList.drop(1)
       
     8 }
       
     9 
       
    10 val urban_ratings = urban_get_csv_file("ratings.csv")
       
    11 val urban_movies = urban_get_csv_file("movies.csv")
       
    12 
       
    13 
       
    14 assert(process_ratings(urban_ratings).length == 48580)
       
    15 
       
    16 assert(process_movies(urban_movies).length == 9742)
       
    17 
       
    18