Files
cheesy-arena-lite/game/score_summary_test.go
2022-08-21 14:52:54 -07:00

22 lines
644 B
Go

// Copyright 2022 Team 254. All Rights Reserved.
// Author: pat@patfairbank.com (Patrick Fairbank)
package game
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestScoreSummaryDetermineMatchStatus(t *testing.T) {
redScoreSummary := &ScoreSummary{Score: 10}
blueScoreSummary := &ScoreSummary{Score: 10}
assert.Equal(t, TieMatch, DetermineMatchStatus(redScoreSummary, blueScoreSummary))
redScoreSummary.Score = 11
assert.Equal(t, RedWonMatch, DetermineMatchStatus(redScoreSummary, blueScoreSummary))
blueScoreSummary.Score = 12
assert.Equal(t, BlueWonMatch, DetermineMatchStatus(redScoreSummary, blueScoreSummary))
}