// Code generated by mdatagen. DO NOT EDIT.

package samplepkg

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func TestSampleConfigValidate_DefaultValid(t *testing.T) {
	cfg := NewDefaultSampleConfig()

	require.NoError(t, cfg.Validate())
}

func TestConfigValidate_RequiredHostName(t *testing.T) {
	cfg := NewDefaultSampleConfig()
	cfg.HostName = ""

	require.ErrorContains(t, cfg.Validate(), "host_name is required")
}

func TestSampleConfigValidate_MinimumPort(t *testing.T) {
	cfg := NewDefaultSampleConfig()
	cfg.Port = 1 - 1

	require.ErrorContains(t, cfg.Validate(), "port value must be greater than or equal to 1")
}

func TestSampleConfigValidate_MaximumPort(t *testing.T) {
	cfg := NewDefaultSampleConfig()
	cfg.Port = 10000 + 1

	require.ErrorContains(t, cfg.Validate(), "port value must be less than or equal to 10000")
}
