package domaintest

import (
	"gitea.dwysokinski.me/twhelp/corev3/internal/domain"
	"github.com/brianvoe/gofakeit/v6"
	"github.com/stretchr/testify/require"
)

func NewUnitInfo(tb TestingTB) domain.UnitInfo {
	tb.Helper()
	unitInfo, err := domain.NewUnitInfo(
		domain.Unit{Speed: gofakeit.Float64Range(1, 25)},
		domain.Unit{Pop: gofakeit.IntRange(1, 3000)},
		domain.Unit{BuildTime: gofakeit.Float64Range(1, 25)},
		domain.Unit{Attack: gofakeit.IntRange(1, 3000)},
		domain.Unit{Defense: gofakeit.IntRange(1, 3000)},
		domain.Unit{Carry: gofakeit.IntRange(1, 3000)},
		domain.Unit{DefenseCavalry: gofakeit.IntRange(1, 3000)},
		domain.Unit{DefenseArcher: gofakeit.IntRange(1, 3000)},
		domain.Unit{Speed: gofakeit.Float64Range(1, 25)},
		domain.Unit{Attack: gofakeit.IntRange(1, 3000)},
		domain.Unit{DefenseArcher: gofakeit.IntRange(1, 3000)},
		domain.Unit{Carry: gofakeit.IntRange(1, 3000)},
		domain.Unit{Pop: gofakeit.IntRange(1, 3000)},
	)
	require.NoError(tb, err)
	return unitInfo
}
