func TestAddReport2(t *testing.T) { fmt.Println("\n\n>>>>>>>>>>>>>>>>>>> TestAddReport <<<<<<<<<<<<<<<<<<<<<<<<<<") newRpt := data.BaseReport{ DateCreated: data.NewCustomTime("2015-02-20T13:45:30"), DateUpdated: data.NewCustomTime("2015-02-25T09:00:01.000"), DeviceType: "IPHONE", DeviceModel: "5S", DeviceID: "1111", RequestType: "Graffiti Removal", RequestTypeID: "10", ImageUrl: "http://www.citysourced.com/image_200.png", ImageUrlXl: "http://www.citysourced.com/image_xl_200.png", ImageUrlLg: "http://www.citysourced.com/image_lg_200.png", ImageUrlMd: "http://www.citysourced.com/image_md_200.png", ImageUrlSm: "http://www.citysourced.com/image_sm_200.png", ImageUrlXs: "http://www.citysourced.com/image_xs_200.png", City: "San Jose", State: "CA", ZipCode: "95101", Latitude: "37.336240", Longitude: "-121.885862", Directionality: "25 N NW", Description: "New graffiti request - someone painted flames on Flames Restaurant", AuthorNameFirst: "Wiley", AuthorNameLast: "Coyote", AuthorEmail: "", AuthorTelephone: "", AuthorIsAnonymous: "true", UrlDetail: "http://www.citysourced.com/report/100/graffiti", UrlShortened: "", StatusType: "Open", } data.Append(newRpt) fmt.Printf("------ After add:\n%s\n", data.DisplayReports()) }
func TestAddComment1(t *testing.T) { fmt.Println("\n\n>>>>>>>>>>>>>>>>>>> TestAddComment1 <<<<<<<<<<<<<<<<<<<<<<<<<<") if e := data.NewComment(102, data.NewCustomTime("2015-11-08T08:08:08"), "Comment created by test case"); e != nil { t.Errorf("NewComment() failed - error: %q", e) } fmt.Printf("------ After add:\n%s\n", data.DisplayCommentData()) }