Created
March 10, 2012 17:34
-
-
Save ubourdon/2012243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("easy test") { | |
val urlCal = new URL("https://www.google.com/calendar/ical/u74t" + | |
"b1k9n53bnc5qsg3694p2l4%40group.calendar.google.com/private-4b" + | |
"4d566cd18fd63d76c6cc6ea84086cf/basic.ics") | |
val builder = new CalendarBuilder(); | |
val cal = builder.build(urlCal.openStream()); | |
val components: ComponentList = cal.getComponents(Component.VEVENT) | |
components.foreach ( x => println( x.asInstanceOf[Component].getName() ) ) | |
} | |
implicit def convertJavaUtilListToScalaImmutableList[A](javaList: java.util.List[A]): List[A] = { | |
if( javaList == null ) Nil | |
else javaList.toArray.toList.map(_.asInstanceOf[A]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment