Esempio n. 1
0
func TestListCategories(t *testing.T) {
	TournamentTest(t, func(t *testutil.T, tm *Tournament) {
		categories := tm.ListCategories()
		if len(categories) != 3 {
			t.ErrorNowf("expected 3 category, got %v", len(categories))
		}
		as := []string{}
		bs := []string{string(CategoryBattlecode2014), string(CategoryBattlecode2015), string(CategoryBattlecode2016)}
		for _, category := range categories {
			as = append(as, string(category))
		}
		t.CompareStringsUnsorted(as, bs)
	})
}