package dag

import (
	"context"
	"testing"
)

type DAG[T any] interface {
	Run(ctx context.Context)
	AddEdge(from, to DAGNode[T]) error
}

type DAGNode[T any] interface {
	Run(ctx context.Context, rs ...T) T
	Skip()
	Error() error
}

type Injector interface {
	Inject(c interface{}) error
}

type Env interface {
	Name() string
	Setup(ctx context.Context) error
	Envs() []string
}

type Cleaner interface {
	Cleanup(ctx context.Context) error
}

type WithContext interface {
	WithContext(ctx context.Context) context.Context
}

type WithOptionalEnvs interface {
	OptionalEnvs() []string
}

type Case interface {
	Test(t *testing.T)
	Envs() []string
}
