Files
galaxy-game/internal/router/router_helper_test.go
T
Ilia Denisov d9c8de27e5 refactor: executors and routers
* refactor: executors and routers
2026-02-09 15:53:34 +03:00

29 lines
640 B
Go

package router_test
import (
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/iliadenisov/galaxy/internal/model/rest"
"github.com/iliadenisov/galaxy/internal/router"
"github.com/iliadenisov/galaxy/internal/router/handler"
)
type dummyExecutor struct {
}
func (e *dummyExecutor) Execute(cmd ...handler.Command) error {
return nil
}
func (e *dummyExecutor) GenerateGame(races []string) (uuid.UUID, error) {
return uuid.New(), nil
}
func (e *dummyExecutor) GameState() (rest.StateResponse, error) {
return rest.StateResponse{}, nil
}
func setupRouter() *gin.Engine {
return router.SetupRouter(&dummyExecutor{})
}