<commit_before>package repository

import (
	"errors"
	"fmt"
	"testing"

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

func TestValidateCreate(t *testing.T) {
	testcases := []struct {
		Name       string
		Repository *Repository
		Errors     []ValidationError
	}{
		{
			Name:       "NoInput",
			Repository: &Repository{},
			Errors: []ValidationError{{
				Field: "name",
				Error: errors.New("name is not between 4 and 32 characters long"),
			}},
		},
		{
			Name:       "NameTooShort",
			Repository: &Repository{Name: "foo"},
			Errors: []ValidationError{{
				Field: "name",
				Error: errors.New("name is not between 4 and 32 characters long"),
			}},
		},
		{
			Name:       "NameTooLong",
			Repository: &Repository{Name: "thisnameiswaytolongtobeadecentusername"},
			Errors: []ValidationError{{
				Field: "name",
				Error: errors.New("name is not between 4 and 32 characters long"),
			}},
		},
		{
			Name:       "NameTooLong",
			Repository: &Repository{Name: "thisnameiswaytolongtobeadecentusername"},
			Errors: []ValidationError{{
				Field: "name",<commit_msg>Remove duplicate repository validation test<commit_after>package repository

import (
	"errors"
	"fmt"
	"testing"

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

func TestValidateCreate(t *testing.T) {
	testcases := []struct {
		Name       string
		Repository *Repository
		Errors     []ValidationError
	}{
		{
			Name:       "NoInput",
			Repository: &Repository{},
			Errors: []ValidationError{{
				Field: "name",
				Error: errors.New("name is not between 4 and 32 characters long"),
			}},
		},
		{
			Name:       "NameTooShort",
			Repository: &Repository{Name: "foo"},
			Errors: []ValidationError{{
				Field: "name",
				Error: errors.New("name is not between 4 and 32 characters long"),
			}},
		},
		{
			Name:       "NameTooLong",
			Repository: &Repository{Name: "thisnameiswaytolongtobeadecentusername"},
			Errors: []ValidationError{{
				Field: "name",
{'fraction_non_alphanumeric': 0.14042333505420754, 'fraction_numerical': 0.007743933918430563, 'mean_word_length': 3.444954128440367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6482830', 'n_tokens_mistral': 725, 'n_tokens_neox': 602, 'n_words': 150}