<commit_before>package metrics

import (
	. "github.com/onsi/gomega"
	"testing"
)

func TestSimulateInc(t *testing.T) {
	RegisterTestingT(t)
	counter := NewModeCounter([]string{"name"})

	counter.Count("name")

	count := counter.Counters["name"].Count()

	Expect(count).To(Equal(int64(1)))
}

func TestFlush(t *testing.T) {
	RegisterTestingT(t)
	counter := NewModeCounter([]string{"name"})

	counter.Counters["name"].Inc(1)

	fl := counter.Flush()

	count := fl.Counters["name"]

	Expect(count).To(Equal(int64(1)))
}
<commit_msg>Moved metrics test to its own package<commit_after>package metrics_test

import (
	"testing"

	"github.com/SpectoLabs/hoverfly/core/metrics"
	. "github.com/onsi/gomega"
)

func TestSimulateInc(t *testing.T) {
	RegisterTestingT(t)
	counter := metrics.NewModeCounter([]string{"name"})

	counter.Count("name")

	count := counter.Counters["name"].Count()

	Expect(count).To(Equal(int64(1)))
}

func TestFlush(t *testing.T) {
	RegisterTestingT(t)
	counter := metrics.NewModeCounter([]string{"name"})

	counter.Counters["name"].Inc(1)

	fl := counter.Flush()

	count := fl.Counters["name"]

	Expect(count).To(Equal(int64(1)))
}

{'fraction_non_alphanumeric': 0.18505647263249347, 'fraction_numerical': 0.01216333622936577, 'mean_word_length': 5.7368421052631575, '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': '5601907', 'n_tokens_mistral': 447, 'n_tokens_neox': 417, 'n_words': 61}