// Copyright 2014 Tamás Gulácsi. All rights reserved.
// Use of this source code is governed by an Apache 2.0
// license that can be found in the LICENSE file.
package picago
import (
"encoding/xml"
"testing"
)
const albumsXML = `
https://picasaweb.google.com/data/feed/api/user/liz2009-03-12T01:19:14.876Zlizhttps://iconPath/liz.jpgLizhttp://picasaweb.google.com/liz
Picasaweb111000lizLiz
https://thumbnailPath/liz.jpg107374182432716500https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID2005-06-17T07:09:42.000Z2009-03-12T01:19:14.000Z
2009-03-12T01:19:14.000ZlolcatsHilarious FelinespublicLizhttp://picasaweb.google.com/lizalbumIDMountain View, CApublic1118992182000149923044lizLizlolcatsHilarious
FelinesLiz`
const photosXML = `
https://picasaweb.google.com/data/feed/user/liz/albumid/albumID2008-12-08T01:24:16.000ZlolcatsHilarious Felinespublichttps://iconPath/Lolcats.jpgLizhttp://picasaweb.google.com/liz
Picasaweb111000albumIDMountain View, CA, USApublic1150527600000149923044lizLiz37.38911780598221 -122.0863866806030337.38482151758655 -122.095892429351837.39341409437787 -122.07688093185425truetruehttp://picasaweb.google.com/data/entry/user/liz/albumid/albumID/photoid/photoID2008-08-15T18:58:44.000Z2008-12-08T01:11:03.000Z2008-12-08T01:11:03.000Zinvisible_bike.jpgBikephotoID1.66002086E9albumIDpublic41029523044121882672400000657130896bace739a44ce90a7d5b451Lizinvisible, bikeinvisible_bike.jpg37.427399548633325 -122.170329093933137.42054944692195 -122.182538509368937.4342496503447 -122.15811967849731`
func TestAtom(t *testing.T) {
for _, text := range []string{albumsXML, photosXML} {
var result Atom
if err := xml.Unmarshal([]byte(text), &result); err != nil {
t.Errorf("Unmarshal error: %v", err)
}
t.Logf("result: %#v", result)
}
}