1st
This commit is contained in:
45
football_test.go
Executable file
45
football_test.go
Executable file
@@ -0,0 +1,45 @@
|
||||
package flashscore
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
/*
|
||||
func TestFixtures(t *testing.T) {
|
||||
var err error
|
||||
//'req, err := http.NewRequest("GET", url, nil)
|
||||
|
||||
logger := log.New(os.Stdout, "", log.LstdFlags)
|
||||
|
||||
db, err := qx.Open("mysql", "root:zkx75fcy@/tipper")
|
||||
//db, err := qx.Open("mysql", "root:lklnmf6@/tipper")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
fs := New(db, logger)
|
||||
round, err := fs.ListFootballChampNextRoundFixtures("/germany/3-liga")
|
||||
if err != nil {
|
||||
fmt.Printf("ListFootballChampFixtures: %s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
buf, _ := json.MarshalIndent(round, "", " ")
|
||||
fmt.Printf("%s\n", buf)
|
||||
}
|
||||
*/
|
||||
|
||||
func TestFootballListOfScheduledMatches(t *testing.T) {
|
||||
result, err := listOfScheduledMatches(Football)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
buf, _ := json.MarshalIndent(result, "", " ")
|
||||
fmt.Printf("ListOfScheduledMatches: %s\n", buf)
|
||||
}
|
||||
Reference in New Issue
Block a user