mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-10 14:16:47 -04:00
24 lines
661 B
Go
24 lines
661 B
Go
// Copyright 2017 Team 254. All Rights Reserved.
|
|
// Author: pat@patfairbank.com (Patrick Fairbank)
|
|
//
|
|
// Helper methods for use in tests in this package and others.
|
|
|
|
package tournament
|
|
|
|
import (
|
|
"github.com/Team254/cheesy-arena/model"
|
|
"testing"
|
|
)
|
|
|
|
func CreateTestAlliances(database *model.Database, allianceCount int) {
|
|
for i := 1; i <= allianceCount; i++ {
|
|
database.CreateAllianceTeam(&model.AllianceTeam{0, i, 0, i})
|
|
database.CreateAllianceTeam(&model.AllianceTeam{0, i, 1, 10 * i})
|
|
database.CreateAllianceTeam(&model.AllianceTeam{0, i, 2, 100 * i})
|
|
}
|
|
}
|
|
|
|
func setupTestDb(t *testing.T) *model.Database {
|
|
return model.SetupTestDb(t, "tournament")
|
|
}
|