package tests

import (
	"testing"

	"github.com/akiver/cs-demo-analyzer/pkg/api"
	"github.com/akiver/cs-demo-analyzer/pkg/api/constants"
	"github.com/akiver/cs-demo-analyzer/tests/assertion"
	"github.com/akiver/cs-demo-analyzer/tests/fake"
	"github.com/akiver/cs-demo-analyzer/tests/testsutils"
	"github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/common"
	"github.com/markus-wa/demoinfocs-golang/v4/pkg/demoinfocs/events"
)

// Match with 1 overtime.
// The server freezes during round 22, players are disconnected but the round still ends by bomb explosion.
// The match is paused and resumed when all players are reconnected.
// https://renown.gg/match/1363
func TestRenown_Match_1363_2025_Ancient(t *testing.T) {
	demoName := "renown_match_1363_2025_ancient"
	demoPath := testsutils.GetDemoPath("cs2", demoName)
	match, err := api.AnalyzeDemo(demoPath, api.AnalyzeDemoOptions{
		Source: constants.DemoSourceRenown,
	})

	if err != nil {
		t.Error(err)
	}

	expectedRoundCount := 28
	expectedPlayerCount := 10
	expectedScoreTeamA := 12
	expectedScoreTeamB := 16
	expectedScoreFirstHalfTeamA := 6
	expectedScoreFirstHalfTeamB := 6
	expectedScoreSecondHalfTeamA := 6
	expectedScoreSecondHalfTeamB := 6
	expectedTeamNameA := "Team ZeZak"
	expectedTeamNameB := "Team PawKo-F-"
	expectedWinnerName := expectedTeamNameB
	expectedMaxRounds := 24

	if len(match.Rounds) != expectedRoundCount {
		t.Errorf("expected %d rounds but got %d", expectedRoundCount, len(match.Rounds))
	}
	if len(match.Players()) != expectedPlayerCount {
		t.Errorf("expected %d players but got %d", expectedPlayerCount, len(match.Players()))
	}
	if match.TeamA.Score != expectedScoreTeamA {
		t.Errorf("expected score team A to be %d got %d", expectedScoreTeamA, match.TeamA.Score)
	}
	if match.TeamB.Score != expectedScoreTeamB {
		t.Errorf("expected score team B to be %d got %d", expectedScoreTeamB, match.TeamB.Score)
	}
	if match.TeamA.Name != expectedTeamNameA {
		t.Errorf("expected team name A to be %s got %s", expectedTeamNameA, match.TeamA.Name)
	}
	if match.TeamB.Name != expectedTeamNameB {
		t.Errorf("expected team name B to be %s got %s", expectedTeamNameB, match.TeamB.Name)
	}
	if match.TeamA.ScoreFirstHalf != expectedScoreFirstHalfTeamA {
		t.Errorf("expected score first half team A to be %d got %d", expectedScoreFirstHalfTeamA, match.TeamA.ScoreFirstHalf)
	}
	if match.TeamB.ScoreFirstHalf != expectedScoreFirstHalfTeamB {
		t.Errorf("expected score first half team B to be %d got %d", expectedScoreFirstHalfTeamB, match.TeamB.ScoreFirstHalf)
	}
	if match.TeamA.ScoreSecondHalf != expectedScoreSecondHalfTeamA {
		t.Errorf("expected score second half team A to be %d got %d", expectedScoreSecondHalfTeamA, match.TeamA.ScoreSecondHalf)
	}
	if match.TeamB.ScoreSecondHalf != expectedScoreSecondHalfTeamB {
		t.Errorf("expected score second half team B to be %d got %d", expectedScoreSecondHalfTeamB, match.TeamB.ScoreSecondHalf)
	}
	if match.Winner.Name != expectedWinnerName {
		t.Errorf("expected winner to be %s but got %s", expectedWinnerName, match.Winner.Name)
	}
	if match.MaxRounds != expectedMaxRounds {
		t.Errorf("expected max rounds to be %d but got %d", expectedMaxRounds, match.MaxRounds)
	}

	var rounds = []fake.FakeRound{
		{
			Number:            1,
			StartTick:         80,
			StartFrame:        1627,
			EndTick:           4489,
			FreezeTimeEndTick: 1359,
			TeamAStartMoney:   4000,
			TeamBStartMoney:   4000,
			TeamAEconomyType:  constants.EconomyTypePistol,
			TeamBEconomyType:  constants.EconomyTypePistol,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        0,
			TeamBScore:        1,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            2,
			StartTick:         4937,
			StartFrame:        7543,
			EndTick:           9533,
			FreezeTimeEndTick: 6217,
			TeamAStartMoney:   11300,
			TeamBStartMoney:   18750,
			TeamAEconomyType:  constants.EconomyTypeEco,
			TeamBEconomyType:  constants.EconomyTypeSemi,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        0,
			TeamBScore:        2,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            3,
			StartTick:         9981,
			StartFrame:        13643,
			EndTick:           15493,
			FreezeTimeEndTick: 11261,
			TeamAStartMoney:   22200,
			TeamBStartMoney:   19500,
			TeamAEconomyType:  constants.EconomyTypeForceBuy,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        1,
			TeamBScore:        2,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            4,
			StartTick:         15941,
			StartFrame:        20767,
			EndTick:           23488,
			FreezeTimeEndTick: 17221,
			TeamAStartMoney:   18850,
			TeamBStartMoney:   16200,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeForceBuy,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        1,
			TeamBScore:        3,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            5,
			StartTick:         23936,
			StartFrame:        30574,
			EndTick:           29537,
			FreezeTimeEndTick: 25216,
			TeamAStartMoney:   16000,
			TeamBStartMoney:   19600,
			TeamAEconomyType:  constants.EconomyTypeEco,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        1,
			TeamBScore:        4,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            6,
			StartTick:         29985,
			StartFrame:        38147,
			EndTick:           35520,
			FreezeTimeEndTick: 31265,
			TeamAStartMoney:   24750,
			TeamBStartMoney:   25450,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        2,
			TeamBScore:        4,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            7,
			StartTick:         35968,
			StartFrame:        45289,
			EndTick:           42535,
			FreezeTimeEndTick: 37248,
			TeamAStartMoney:   19200,
			TeamBStartMoney:   24650,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        3,
			TeamBScore:        4,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            8,
			StartTick:         42983,
			StartFrame:        54041,
			EndTick:           47429,
			FreezeTimeEndTick: 44263,
			TeamAStartMoney:   19200,
			TeamBStartMoney:   14850,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeSemi,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        4,
			TeamBScore:        4,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            9,
			StartTick:         47877,
			StartFrame:        59716,
			EndTick:           55490,
			FreezeTimeEndTick: 49157,
			TeamAStartMoney:   22050,
			TeamBStartMoney:   21250,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonBombDefused,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        5,
			TeamBScore:        4,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            10,
			StartTick:         55938,
			StartFrame:        69427,
			EndTick:           62076,
			FreezeTimeEndTick: 57218,
			TeamAStartMoney:   35550,
			TeamBStartMoney:   20000,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeSemi,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        6,
			TeamBScore:        4,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            11,
			StartTick:         62524,
			StartFrame:        77958,
			EndTick:           66461,
			FreezeTimeEndTick: 63804,
			TeamAStartMoney:   34150,
			TeamBStartMoney:   19550,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeSemi,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        6,
			TeamBScore:        5,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            12,
			StartTick:         66909,
			StartFrame:        83207,
			EndTick:           71999,
			FreezeTimeEndTick: 68189,
			TeamAStartMoney:   28300,
			TeamBStartMoney:   22050,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        6,
			TeamBScore:        6,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            13,
			StartTick:         72959,
			StartFrame:        90589,
			EndTick:           77330,
			FreezeTimeEndTick: 74239,
			TeamAStartMoney:   4000,
			TeamBStartMoney:   4000,
			TeamAEconomyType:  constants.EconomyTypePistol,
			TeamBEconomyType:  constants.EconomyTypePistol,
			EndReason:         events.RoundEndReasonBombDefused,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        6,
			TeamBScore:        7,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            14,
			StartTick:         77778,
			StartFrame:        96157,
			EndTick:           84261,
			FreezeTimeEndTick: 79058,
			TeamAStartMoney:   13650,
			TeamBStartMoney:   19900,
			TeamAEconomyType:  constants.EconomyTypeSemi,
			TeamBEconomyType:  constants.EconomyTypeSemi,
			EndReason:         events.RoundEndReasonBombDefused,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        6,
			TeamBScore:        8,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            15,
			StartTick:         84709,
			StartFrame:        105165,
			EndTick:           88990,
			FreezeTimeEndTick: 85989,
			TeamAStartMoney:   18900,
			TeamBStartMoney:   20250,
			TeamAEconomyType:  constants.EconomyTypeSemi,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonBombDefused,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        6,
			TeamBScore:        9,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            16,
			StartTick:         89438,
			StartFrame:        111303,
			EndTick:           93176,
			FreezeTimeEndTick: 90718,
			TeamAStartMoney:   30900,
			TeamBStartMoney:   23650,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        6,
			TeamBScore:        10,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            17,
			StartTick:         93624,
			StartFrame:        116086,
			EndTick:           103998,
			FreezeTimeEndTick: 94904,
			TeamAStartMoney:   23800,
			TeamBStartMoney:   30600,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        7,
			TeamBScore:        10,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            18,
			StartTick:         104446,
			StartFrame:        128908,
			EndTick:           110804,
			FreezeTimeEndTick: 105726,
			TeamAStartMoney:   19550,
			TeamBStartMoney:   29400,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        8,
			TeamBScore:        10,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            19,
			StartTick:         111252,
			StartFrame:        137261,
			EndTick:           117146,
			FreezeTimeEndTick: 112532,
			TeamAStartMoney:   21650,
			TeamBStartMoney:   12300,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeEco,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        9,
			TeamBScore:        10,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            20,
			StartTick:         117594,
			StartFrame:        145033,
			EndTick:           124410,
			FreezeTimeEndTick: 118874,
			TeamAStartMoney:   33200,
			TeamBStartMoney:   23450,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonTargetBombed,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        10,
			TeamBScore:        10,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            21,
			StartTick:         124858,
			StartFrame:        154221,
			EndTick:           129567,
			FreezeTimeEndTick: 126138,
			TeamAStartMoney:   34400,
			TeamBStartMoney:   15500,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        10,
			TeamBScore:        11,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            22,
			StartTick:         130015,
			StartFrame:        160214,
			EndTick:           135454,
			FreezeTimeEndTick: 131295,
			TeamAStartMoney:   23550,
			TeamBStartMoney:   19650,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        11,
			TeamBScore:        11,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            23,
			StartTick:         158942,
			StartFrame:        191729,
			EndTick:           167919,
			FreezeTimeEndTick: 160222,
			TeamAStartMoney:   19400,
			TeamBStartMoney:   16900,
			TeamAEconomyType:  constants.EconomyTypeSemi,
			TeamBEconomyType:  constants.EconomyTypeForceBuy,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        12,
			TeamBScore:        11,
			WinnerName:        expectedTeamNameA,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			Number:            24,
			StartTick:         168367,
			StartFrame:        203210,
			EndTick:           171741,
			FreezeTimeEndTick: 169647,
			TeamAStartMoney:   18500,
			TeamBStartMoney:   17250,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeForceBuy,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        12,
			TeamBScore:        12,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			OvertimeNumber:    1,
			Number:            25,
			StartTick:         172701,
			StartFrame:        208441,
			EndTick:           177975,
			FreezeTimeEndTick: 173981,
			TeamAStartMoney:   62500,
			TeamBStartMoney:   62500,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        12,
			TeamBScore:        13,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			OvertimeNumber:    1,
			Number:            26,
			StartTick:         178423,
			StartFrame:        215189,
			EndTick:           184760,
			FreezeTimeEndTick: 179703,
			TeamAStartMoney:   48400,
			TeamBStartMoney:   53100,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        12,
			TeamBScore:        14,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			OvertimeNumber:    1,
			Number:            27,
			StartTick:         185208,
			StartFrame:        223641,
			EndTick:           191643,
			FreezeTimeEndTick: 186488,
			TeamAStartMoney:   37100,
			TeamBStartMoney:   46850,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonCTWin,
			WinnerSide:        common.TeamCounterTerrorists,
			TeamAScore:        12,
			TeamBScore:        15,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamTerrorists,
			TeamBSide:         common.TeamCounterTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
		{
			OvertimeNumber:    1,
			Number:            28,
			StartTick:         192603,
			StartFrame:        232624,
			EndTick:           197392,
			FreezeTimeEndTick: 193883,
			TeamAStartMoney:   44900,
			TeamBStartMoney:   55950,
			TeamAEconomyType:  constants.EconomyTypeFull,
			TeamBEconomyType:  constants.EconomyTypeFull,
			EndReason:         events.RoundEndReasonTerroristsWin,
			WinnerSide:        common.TeamTerrorists,
			TeamAScore:        12,
			TeamBScore:        16,
			WinnerName:        expectedTeamNameB,
			TeamASide:         common.TeamCounterTerrorists,
			TeamBSide:         common.TeamTerrorists,
			TeamAName:         expectedTeamNameA,
			TeamBName:         expectedTeamNameB,
		},
	}

	var players = []fake.FakePlayer{
		{
			SteamID64:     76561198005743386,
			Name:          "PawKo-F-",
			KillCount:     18,
			AssistCount:   16,
			DeathCount:    19,
			Score:         47,
			Team:          match.TeamB,
			HeadshotCount: 10,
			MvpCount:      2,
			UtilityDamage: 536,
		},
		{
			SteamID64:     76561198149639731,
			Name:          "Nepo",
			KillCount:     15,
			AssistCount:   9,
			DeathCount:    22,
			Score:         38,
			Team:          match.TeamB,
			HeadshotCount: 9,
			MvpCount:      1,
			UtilityDamage: 113,
		},
		{
			SteamID64:     76561198088755702,
			Name:          "150k",
			KillCount:     20,
			AssistCount:   4,
			DeathCount:    19,
			Score:         52,
			Team:          match.TeamB,
			HeadshotCount: 9,
			MvpCount:      3,
			UtilityDamage: 152,
		},
		{
			SteamID64:     76561199226791316,
			Name:          "merkan",
			KillCount:     26,
			AssistCount:   8,
			DeathCount:    16,
			Score:         67,
			Team:          match.TeamB,
			HeadshotCount: 13,
			MvpCount:      5,
			UtilityDamage: 295,
		},
		{
			SteamID64:     76561198311583763,
			Name:          "Frankk",
			KillCount:     25,
			AssistCount:   14,
			DeathCount:    17,
			Score:         70,
			Team:          match.TeamB,
			HeadshotCount: 11,
			MvpCount:      5,
			UtilityDamage: 365,
		},
		{
			SteamID64:     76561198333962838,
			Name:          "-k1dob",
			KillCount:     21,
			AssistCount:   10,
			DeathCount:    24,
			Score:         49,
			Team:          match.TeamA,
			HeadshotCount: 7,
			MvpCount:      3,
			UtilityDamage: 498,
		},
		{
			SteamID64:     76561198399730278,
			Name:          "SpeaR",
			KillCount:     21,
			AssistCount:   8,
			DeathCount:    19,
			Score:         50,
			Team:          match.TeamA,
			HeadshotCount: 7,
			MvpCount:      5,
			UtilityDamage: 165,
		},
		{
			SteamID64:     76561198310306598,
			Name:          "roberto079",
			KillCount:     16,
			AssistCount:   9,
			DeathCount:    23,
			Score:         39,
			Team:          match.TeamA,
			HeadshotCount: 5,
			MvpCount:      0,
			UtilityDamage: 46,
		},
		{
			SteamID64:     76561198198183831,
			Name:          "ZeZak",
			KillCount:     18,
			AssistCount:   8,
			DeathCount:    21,
			Score:         43,
			Team:          match.TeamA,
			HeadshotCount: 10,
			MvpCount:      1,
			UtilityDamage: 69,
		},
		{
			SteamID64:     76561197997681471,
			Name:          "ScRaSh",
			KillCount:     15,
			AssistCount:   4,
			DeathCount:    19,
			Score:         47,
			Team:          match.TeamA,
			HeadshotCount: 8,
			MvpCount:      3,
			UtilityDamage: 242,
		},
	}

	assertion.AssertPlayers(t, match, players)
	assertion.AssertRounds(t, match, rounds)
}
