From c2b547ff34e794918b74bb28cb76ab43bb2d4916 Mon Sep 17 00:00:00 2001 From: Yared Yemane Date: Mon, 2 Jun 2025 17:24:01 +0300 Subject: [PATCH] sprots_eval_test fix --- internal/services/result/sports_eval_test.go | 118 +++++++++---------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/internal/services/result/sports_eval_test.go b/internal/services/result/sports_eval_test.go index 4810385..9132658 100644 --- a/internal/services/result/sports_eval_test.go +++ b/internal/services/result/sports_eval_test.go @@ -29,75 +29,75 @@ func TestNFLMarkets(t *testing.T) { case int64(domain.AMERICAN_FOOTBALL_MONEY_LINE): // Home win, away win, draw, and invalid OddHeader for Money Line t.Run("Home Win", func(t *testing.T) { - status, err := evaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 21, Away: 14}) + status, err := EvaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 21, Away: 14}) t.Logf("Market: %s, Scenario: Home Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Away Win", func(t *testing.T) { - status, err := evaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2"}, struct{ Home, Away int }{Home: 14, Away: 21}) + status, err := EvaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2"}, struct{ Home, Away int }{Home: 14, Away: 21}) t.Logf("Market: %s, Scenario: Away Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Draw", func(t *testing.T) { - status, err := evaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 17, Away: 17}) + status, err := EvaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 17, Away: 17}) t.Logf("Market: %s, Scenario: Draw", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_LOSS, status) }) t.Run("Invalid OddHeader", func(t *testing.T) { - status, err := evaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "X"}, struct{ Home, Away int }{Home: 10, Away: 7}) + status, err := EvaluateNFLMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "X"}, struct{ Home, Away int }{Home: 10, Away: 7}) t.Logf("Market: %s, Scenario: Invalid OddHeader", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) }) case int64(domain.AMERICAN_FOOTBALL_SPREAD): t.Run("Home Win with Handicap", func(t *testing.T) { - status, err := evaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "-3.5"}, struct{ Home, Away int }{Home: 24, Away: 20}) + status, err := EvaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "-3.5"}, struct{ Home, Away int }{Home: 24, Away: 20}) t.Logf("Market: %s, Scenario: Home Win with Handicap", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Away Win with Handicap", func(t *testing.T) { - status, err := evaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2", OddHandicap: "+3.5"}, struct{ Home, Away int }{Home: 20, Away: 24}) + status, err := EvaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2", OddHandicap: "+3.5"}, struct{ Home, Away int }{Home: 20, Away: 24}) t.Logf("Market: %s, Scenario: Away Win with Handicap", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Push (Void)", func(t *testing.T) { - status, err := evaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "0"}, struct{ Home, Away int }{Home: 21, Away: 21}) + status, err := EvaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "0"}, struct{ Home, Away int }{Home: 21, Away: 21}) t.Logf("Market: %s, Scenario: Push (Void)", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_VOID, status) }) t.Run("Non-numeric Handicap", func(t *testing.T) { - status, err := evaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "notanumber"}, struct{ Home, Away int }{Home: 21, Away: 14}) + status, err := EvaluateNFLSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "notanumber"}, struct{ Home, Away int }{Home: 21, Away: 14}) t.Logf("Market: %s, Scenario: Non-numeric Handicap", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) }) case int64(domain.AMERICAN_FOOTBALL_TOTAL_POINTS): t.Run("Over Win", func(t *testing.T) { - status, err := evaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "44.5"}, struct{ Home, Away int }{Home: 30, Away: 20}) + status, err := EvaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "44.5"}, struct{ Home, Away int }{Home: 30, Away: 20}) t.Logf("Market: %s, Scenario: Over Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Under Win", func(t *testing.T) { - status, err := evaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Under", OddName: "44.5"}, struct{ Home, Away int }{Home: 20, Away: 17}) + status, err := EvaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Under", OddName: "44.5"}, struct{ Home, Away int }{Home: 20, Away: 17}) t.Logf("Market: %s, Scenario: Under Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Push (Void)", func(t *testing.T) { - status, err := evaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "37"}, struct{ Home, Away int }{Home: 20, Away: 17}) + status, err := EvaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "37"}, struct{ Home, Away int }{Home: 20, Away: 17}) t.Logf("Market: %s, Scenario: Push (Void)", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_VOID, status) }) t.Run("Non-numeric OddName", func(t *testing.T) { - status, err := evaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "notanumber"}, struct{ Home, Away int }{Home: 20, Away: 17}) + status, err := EvaluateNFLTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "notanumber"}, struct{ Home, Away int }{Home: 20, Away: 17}) t.Logf("Market: %s, Scenario: Non-numeric OddName", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) @@ -128,75 +128,75 @@ func TestRugbyMarkets(t *testing.T) { case int64(domain.RUGBY_MONEY_LINE): // Home win, away win, draw, and invalid OddHeader for Money Line t.Run("Home Win", func(t *testing.T) { - status, err := evaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 30, Away: 20}) + status, err := EvaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 30, Away: 20}) t.Logf("Market: %s, Scenario: Home Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Away Win", func(t *testing.T) { - status, err := evaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2"}, struct{ Home, Away int }{Home: 20, Away: 30}) + status, err := EvaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2"}, struct{ Home, Away int }{Home: 20, Away: 30}) t.Logf("Market: %s, Scenario: Away Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Draw", func(t *testing.T) { - status, err := evaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 25, Away: 25}) + status, err := EvaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 25, Away: 25}) t.Logf("Market: %s, Scenario: Draw", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_LOSS, status) }) t.Run("Invalid OddHeader", func(t *testing.T) { - status, err := evaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "X"}, struct{ Home, Away int }{Home: 10, Away: 7}) + status, err := EvaluateRugbyMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "X"}, struct{ Home, Away int }{Home: 10, Away: 7}) t.Logf("Market: %s, Scenario: Invalid OddHeader", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) }) case int64(domain.RUGBY_SPREAD), int64(domain.RUGBY_HANDICAP): t.Run("Home Win with Handicap", func(t *testing.T) { - status, err := evaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "-6.5"}, struct{ Home, Away int }{Home: 28, Away: 20}) + status, err := EvaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "-6.5"}, struct{ Home, Away int }{Home: 28, Away: 20}) t.Logf("Market: %s, Scenario: Home Win with Handicap", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Away Win with Handicap", func(t *testing.T) { - status, err := evaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2", OddHandicap: "+6.5"}, struct{ Home, Away int }{Home: 20, Away: 28}) + status, err := EvaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2", OddHandicap: "+6.5"}, struct{ Home, Away int }{Home: 20, Away: 28}) t.Logf("Market: %s, Scenario: Away Win with Handicap", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Push (Void)", func(t *testing.T) { - status, err := evaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "0"}, struct{ Home, Away int }{Home: 21, Away: 21}) + status, err := EvaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "0"}, struct{ Home, Away int }{Home: 21, Away: 21}) t.Logf("Market: %s, Scenario: Push (Void)", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_VOID, status) }) t.Run("Non-numeric Handicap", func(t *testing.T) { - status, err := evaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "notanumber"}, struct{ Home, Away int }{Home: 21, Away: 14}) + status, err := EvaluateRugbySpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "notanumber"}, struct{ Home, Away int }{Home: 21, Away: 14}) t.Logf("Market: %s, Scenario: Non-numeric Handicap", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) }) case int64(domain.RUGBY_TOTAL_POINTS): t.Run("Over Win", func(t *testing.T) { - status, err := evaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "40.5"}, struct{ Home, Away int }{Home: 25, Away: 20}) + status, err := EvaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "40.5"}, struct{ Home, Away int }{Home: 25, Away: 20}) t.Logf("Market: %s, Scenario: Over Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Under Win", func(t *testing.T) { - status, err := evaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Under", OddName: "40.5"}, struct{ Home, Away int }{Home: 15, Away: 20}) + status, err := EvaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Under", OddName: "40.5"}, struct{ Home, Away int }{Home: 15, Away: 20}) t.Logf("Market: %s, Scenario: Under Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Push (Void)", func(t *testing.T) { - status, err := evaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "35"}, struct{ Home, Away int }{Home: 20, Away: 15}) + status, err := EvaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "35"}, struct{ Home, Away int }{Home: 20, Away: 15}) t.Logf("Market: %s, Scenario: Push (Void)", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_VOID, status) }) t.Run("Non-numeric OddName", func(t *testing.T) { - status, err := evaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "notanumber"}, struct{ Home, Away int }{Home: 20, Away: 15}) + status, err := EvaluateRugbyTotalPoints(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "notanumber"}, struct{ Home, Away int }{Home: 20, Away: 15}) t.Logf("Market: %s, Scenario: Non-numeric OddName", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) @@ -226,75 +226,75 @@ func TestBaseballMarkets(t *testing.T) { case int64(domain.BASEBALL_MONEY_LINE): // Home win, away win, draw, and invalid OddHeader for Money Line t.Run("Home Win", func(t *testing.T) { - status, err := evaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 6, Away: 3}) + status, err := EvaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 6, Away: 3}) t.Logf("Market: %s, Scenario: Home Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Away Win", func(t *testing.T) { - status, err := evaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2"}, struct{ Home, Away int }{Home: 2, Away: 5}) + status, err := EvaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2"}, struct{ Home, Away int }{Home: 2, Away: 5}) t.Logf("Market: %s, Scenario: Away Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Draw", func(t *testing.T) { - status, err := evaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 4, Away: 4}) + status, err := EvaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1"}, struct{ Home, Away int }{Home: 4, Away: 4}) t.Logf("Market: %s, Scenario: Draw", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_LOSS, status) }) t.Run("Invalid OddHeader", func(t *testing.T) { - status, err := evaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "X"}, struct{ Home, Away int }{Home: 10, Away: 7}) + status, err := EvaluateBaseballMoneyLine(domain.BetOutcome{MarketID: m.marketID, OddHeader: "X"}, struct{ Home, Away int }{Home: 10, Away: 7}) t.Logf("Market: %s, Scenario: Invalid OddHeader", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) }) case int64(domain.BASEBALL_SPREAD): t.Run("Home Win with Handicap", func(t *testing.T) { - status, err := evaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "-1.5"}, struct{ Home, Away int }{Home: 5, Away: 3}) + status, err := EvaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "-1.5"}, struct{ Home, Away int }{Home: 5, Away: 3}) t.Logf("Market: %s, Scenario: Home Win with Handicap", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Away Win with Handicap", func(t *testing.T) { - status, err := evaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2", OddHandicap: "+1.5"}, struct{ Home, Away int }{Home: 3, Away: 5}) + status, err := EvaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "2", OddHandicap: "+1.5"}, struct{ Home, Away int }{Home: 3, Away: 5}) t.Logf("Market: %s, Scenario: Away Win with Handicap", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Push (Void)", func(t *testing.T) { - status, err := evaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "0"}, struct{ Home, Away int }{Home: 4, Away: 4}) + status, err := EvaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "0"}, struct{ Home, Away int }{Home: 4, Away: 4}) t.Logf("Market: %s, Scenario: Push (Void)", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_VOID, status) }) t.Run("Non-numeric Handicap", func(t *testing.T) { - status, err := evaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "notanumber"}, struct{ Home, Away int }{Home: 5, Away: 3}) + status, err := EvaluateBaseballSpread(domain.BetOutcome{MarketID: m.marketID, OddHeader: "1", OddHandicap: "notanumber"}, struct{ Home, Away int }{Home: 5, Away: 3}) t.Logf("Market: %s, Scenario: Non-numeric Handicap", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) }) case int64(domain.BASEBALL_TOTAL_RUNS): t.Run("Over Win", func(t *testing.T) { - status, err := evaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "7.5"}, struct{ Home, Away int }{Home: 5, Away: 4}) + status, err := EvaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "7.5"}, struct{ Home, Away int }{Home: 5, Away: 4}) t.Logf("Market: %s, Scenario: Over Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Under Win", func(t *testing.T) { - status, err := evaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Under", OddName: "7.5"}, struct{ Home, Away int }{Home: 2, Away: 3}) + status, err := EvaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Under", OddName: "7.5"}, struct{ Home, Away int }{Home: 2, Away: 3}) t.Logf("Market: %s, Scenario: Under Win", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_WIN, status) }) t.Run("Push (Void)", func(t *testing.T) { - status, err := evaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "7"}, struct{ Home, Away int }{Home: 4, Away: 3}) + status, err := EvaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "7"}, struct{ Home, Away int }{Home: 4, Away: 3}) t.Logf("Market: %s, Scenario: Push (Void)", m.name) assert.NoError(t, err) assert.Equal(t, domain.OUTCOME_STATUS_VOID, status) }) t.Run("Non-numeric OddName", func(t *testing.T) { - status, err := evaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "notanumber"}, struct{ Home, Away int }{Home: 4, Away: 3}) + status, err := EvaluateBaseballTotalRuns(domain.BetOutcome{MarketID: m.marketID, OddHeader: "Over", OddName: "notanumber"}, struct{ Home, Away int }{Home: 4, Away: 3}) t.Logf("Market: %s, Scenario: Non-numeric OddName", m.name) assert.Error(t, err) assert.Equal(t, domain.OUTCOME_STATUS_PENDING, status) @@ -338,7 +338,7 @@ func TestEvaluateFootballOutcome(t *testing.T) { } // Act - status, _ := service.evaluateFootballOutcome(outcome, finalScore, firstHalfScore, secondHalfScore, corners, halfTimeCorners, events) + status, _ := service.EvaluateFootballOutcome(outcome, finalScore, firstHalfScore, secondHalfScore, corners, halfTimeCorners, events) fmt.Printf("\n\nBet Outcome: %v\n\n", &status) @@ -357,7 +357,7 @@ func TestEvaluateTotalLegs(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateTotalLegs(tt.outcome, tt.score) + status, _ := EvaluateTotalLegs(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -380,7 +380,7 @@ func TestEvaluateGameLines(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateGameLines(tt.outcome, tt.score) + status, _ := EvaluateGameLines(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -408,7 +408,7 @@ func TestEvaluateFirstTeamToScore(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateFirstTeamToScore(tt.outcome, tt.events) + status, _ := EvaluateFirstTeamToScore(tt.outcome, tt.events) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -430,7 +430,7 @@ func TestEvaluateGoalsOverUnder(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateGoalsOverUnder(tt.outcome, tt.score) + status, _ := EvaluateGoalsOverUnder(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -452,7 +452,7 @@ func TestEvaluateGoalsOddEven(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateGoalsOddEven(tt.outcome, tt.score) + status, _ := EvaluateGoalsOddEven(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -474,7 +474,7 @@ func TestEvaluateCorrectScore(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateCorrectScore(tt.outcome, tt.score) + status, _ := EvaluateCorrectScore(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -498,7 +498,7 @@ func TestEvaluateHighestScoringHalf(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateHighestScoringHalf(tt.outcome, tt.firstScore, tt.secondScore) + status, _ := EvaluateHighestScoringHalf(tt.outcome, tt.firstScore, tt.secondScore) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -551,7 +551,7 @@ func TestEvaluateHighestScoringQuarter(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateHighestScoringQuarter(tt.outcome, tt.firstScore, tt.secondScore, tt.thirdScore, tt.fourthScore) + status, _ := EvaluateHighestScoringQuarter(tt.outcome, tt.firstScore, tt.secondScore, tt.thirdScore, tt.fourthScore) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -577,7 +577,7 @@ func TestEvaluateWinningMargin(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateWinningMargin(tt.outcome, tt.score) + status, _ := EvaluateWinningMargin(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -605,7 +605,7 @@ func TestEvaluateDoubleResult(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateDoubleResult(tt.outcome, tt.firstHalfScore, tt.fullTimeScore) + status, _ := EvaluateDoubleResult(tt.outcome, tt.firstHalfScore, tt.fullTimeScore) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -632,7 +632,7 @@ func TestEvaluateHighestScoringPeriod(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateHighestScoringPeriod(tt.outcome, tt.firstScore, tt.secondScore, tt.thirdScore) + status, _ := EvaluateHighestScoringPeriod(tt.outcome, tt.firstScore, tt.secondScore, tt.thirdScore) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -656,7 +656,7 @@ func TestEvalauteTiedAfterRegulation(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateTiedAfterRegulation(tt.outcome, tt.score) + status, _ := EvaluateTiedAfterRegulation(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -680,7 +680,7 @@ func TestEvaluateTeamTotal(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateTeamTotal(tt.outcome, tt.score) + status, _ := EvaluateTeamTotal(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -703,7 +703,7 @@ func TestDrawNoBet(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateDrawNoBet(tt.outcome, tt.score) + status, _ := EvaluateDrawNoBet(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -727,7 +727,7 @@ func TestEvaluateMoneyLine(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateMoneyLine(tt.outcome, tt.score) + status, _ := EvaluateMoneyLine(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -751,7 +751,7 @@ func TestEvaluateDoubleChance(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateDoubleChance(tt.outcome, tt.score) + status, _ := EvaluateDoubleChance(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -775,7 +775,7 @@ func TestEvaluateResultAndTotal(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateResultAndTotal(tt.outcome, tt.score) + status, _ := EvaluateResultAndTotal(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -826,7 +826,7 @@ func TestEvaluateBTTSX(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateBTTSX(tt.outcome, tt.score) + status, _ := EvaluateBTTSX(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -852,7 +852,7 @@ func TestEvaluateResultAndBTTSX(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateResultAndBTTSX(tt.outcome, tt.score) + status, _ := EvaluateResultAndBTTSX(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -876,7 +876,7 @@ func TestEvaluateMoneyLine3Way(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateMoneyLine3Way(tt.outcome, tt.score) + status, _ := EvaluateMoneyLine3Way(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -937,7 +937,7 @@ func TestEvaluateAsianHandicap(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateAsianHandicap(tt.outcome, tt.score) + status, _ := EvaluateAsianHandicap(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) } @@ -971,7 +971,7 @@ func TestEvaluateHandicapAndTotal(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - status, _ := evaluateHandicapAndTotal(tt.outcome, tt.score) + status, _ := EvaluateHandicapAndTotal(tt.outcome, tt.score) if status != tt.expected { t.Errorf("expected %d, got %d", tt.expected, status) }