Skip to content

Commit

Permalink
refactor(context): rename multi-word packages to a single word
Browse files Browse the repository at this point in the history
  • Loading branch information
bastean committed Sep 18, 2024
1 parent 8fec6d8 commit 00528ba
Show file tree
Hide file tree
Showing 48 changed files with 173 additions and 173 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package valueobjs_test
package components_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/valueobjs"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/components"
)

type ActionValueObjectTestSuite struct {
type ActionTestSuite struct {
suite.Suite
}

func (suite *ActionValueObjectTestSuite) SetupTest() {}
func (suite *ActionTestSuite) SetupTest() {}

func (suite *ActionValueObjectTestSuite) TestWithInvalidLength() {
value, err := valueobjs.ActionWithInvalidLength()
func (suite *ActionTestSuite) TestWithInvalidLength() {
value, err := components.ActionWithInvalidLength()

var actual *errors.ErrInvalidValue

Expand All @@ -34,6 +34,6 @@ func (suite *ActionValueObjectTestSuite) TestWithInvalidLength() {
suite.EqualError(expected, actual.Error())
}

func TestUnitActionValueObjectSuite(t *testing.T) {
suite.Run(t, new(ActionValueObjectTestSuite))
func TestUnitActionSuite(t *testing.T) {
suite.Run(t, new(ActionTestSuite))
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package valueobjs_test
package components_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/valueobjs"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/components"
)

type CommandValueObjectTestSuite struct {
type CommandTestSuite struct {
suite.Suite
}

func (suite *CommandValueObjectTestSuite) SetupTest() {}
func (suite *CommandTestSuite) SetupTest() {}

func (suite *CommandValueObjectTestSuite) TestWithInvalidLength() {
value, err := valueobjs.CommandWithInvalidLength()
func (suite *CommandTestSuite) TestWithInvalidLength() {
value, err := components.CommandWithInvalidLength()

var actual *errors.ErrInvalidValue

Expand All @@ -34,8 +34,8 @@ func (suite *CommandValueObjectTestSuite) TestWithInvalidLength() {
suite.EqualError(expected, actual.Error())
}

func (suite *CommandValueObjectTestSuite) TestWithInvalidAlpha() {
value, err := valueobjs.CommandWithInvalidAlpha()
func (suite *CommandTestSuite) TestWithInvalidAlpha() {
value, err := components.CommandWithInvalidAlpha()

var actual *errors.ErrInvalidValue

Expand All @@ -53,6 +53,6 @@ func (suite *CommandValueObjectTestSuite) TestWithInvalidAlpha() {
suite.EqualError(expected, actual.Error())
}

func TestUnitCommandValueObjectSuite(t *testing.T) {
suite.Run(t, new(CommandValueObjectTestSuite))
func TestUnitCommandSuite(t *testing.T) {
suite.Run(t, new(CommandTestSuite))
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package valueobjs_test
package components_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/valueobjs"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/components"
)

type EntityValueObjectTestSuite struct {
type EntityTestSuite struct {
suite.Suite
}

func (suite *EntityValueObjectTestSuite) SetupTest() {}
func (suite *EntityTestSuite) SetupTest() {}

func (suite *EntityValueObjectTestSuite) TestWithInvalidLength() {
value, err := valueobjs.EntityWithInvalidLength()
func (suite *EntityTestSuite) TestWithInvalidLength() {
value, err := components.EntityWithInvalidLength()

var actual *errors.ErrInvalidValue

Expand All @@ -34,8 +34,8 @@ func (suite *EntityValueObjectTestSuite) TestWithInvalidLength() {
suite.EqualError(expected, actual.Error())
}

func (suite *EntityValueObjectTestSuite) TestWithInvalidAlpha() {
value, err := valueobjs.EntityWithInvalidAlpha()
func (suite *EntityTestSuite) TestWithInvalidAlpha() {
value, err := components.EntityWithInvalidAlpha()

var actual *errors.ErrInvalidValue

Expand All @@ -53,6 +53,6 @@ func (suite *EntityValueObjectTestSuite) TestWithInvalidAlpha() {
suite.EqualError(expected, actual.Error())
}

func TestUnitEntityValueObjectSuite(t *testing.T) {
suite.Run(t, new(EntityValueObjectTestSuite))
func TestUnitEntitySuite(t *testing.T) {
suite.Run(t, new(EntityTestSuite))
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package valueobjs_test
package components_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/valueobjs"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/components"
)

type EventValueObjectTestSuite struct {
type EventTestSuite struct {
suite.Suite
}

func (suite *EventValueObjectTestSuite) SetupTest() {}
func (suite *EventTestSuite) SetupTest() {}

func (suite *EventValueObjectTestSuite) TestWithInvalidLength() {
value, err := valueobjs.EventWithInvalidLength()
func (suite *EventTestSuite) TestWithInvalidLength() {
value, err := components.EventWithInvalidLength()

var actual *errors.ErrInvalidValue

Expand All @@ -34,8 +34,8 @@ func (suite *EventValueObjectTestSuite) TestWithInvalidLength() {
suite.EqualError(expected, actual.Error())
}

func (suite *EventValueObjectTestSuite) TestWithInvalidAlpha() {
value, err := valueobjs.EventWithInvalidAlpha()
func (suite *EventTestSuite) TestWithInvalidAlpha() {
value, err := components.EventWithInvalidAlpha()

var actual *errors.ErrInvalidValue

Expand All @@ -53,6 +53,6 @@ func (suite *EventValueObjectTestSuite) TestWithInvalidAlpha() {
suite.EqualError(expected, actual.Error())
}

func TestUnitEventValueObjectSuite(t *testing.T) {
suite.Run(t, new(EventValueObjectTestSuite))
func TestUnitEventSuite(t *testing.T) {
suite.Run(t, new(EventTestSuite))
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package valueobjs_test
package components_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/valueobjs"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/components"
)

type OrganizationValueObjectTestSuite struct {
type OrganizationTestSuite struct {
suite.Suite
}

func (suite *OrganizationValueObjectTestSuite) SetupTest() {}
func (suite *OrganizationTestSuite) SetupTest() {}

func (suite *OrganizationValueObjectTestSuite) TestWithInvalidLength() {
value, err := valueobjs.OrganizationWithInvalidLength()
func (suite *OrganizationTestSuite) TestWithInvalidLength() {
value, err := components.OrganizationWithInvalidLength()

var actual *errors.ErrInvalidValue

Expand All @@ -34,8 +34,8 @@ func (suite *OrganizationValueObjectTestSuite) TestWithInvalidLength() {
suite.EqualError(expected, actual.Error())
}

func (suite *OrganizationValueObjectTestSuite) TestWithInvalidAlphanumeric() {
value, err := valueobjs.OrganizationWithInvalidAlphanumeric()
func (suite *OrganizationTestSuite) TestWithInvalidAlphanumeric() {
value, err := components.OrganizationWithInvalidAlphanumeric()

var actual *errors.ErrInvalidValue

Expand All @@ -53,6 +53,6 @@ func (suite *OrganizationValueObjectTestSuite) TestWithInvalidAlphanumeric() {
suite.EqualError(expected, actual.Error())
}

func TestUnitOrganizationValueObjectSuite(t *testing.T) {
suite.Run(t, new(OrganizationValueObjectTestSuite))
func TestUnitOrganizationSuite(t *testing.T) {
suite.Run(t, new(OrganizationTestSuite))
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package valueobjs_test
package components_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/valueobjs"
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/messages/components"
)

type ServiceValueObjectTestSuite struct {
type ServiceTestSuite struct {
suite.Suite
}

func (suite *ServiceValueObjectTestSuite) SetupTest() {}
func (suite *ServiceTestSuite) SetupTest() {}

func (suite *ServiceValueObjectTestSuite) TestWithInvalidLength() {
value, err := valueobjs.ServiceWithInvalidLength()
func (suite *ServiceTestSuite) TestWithInvalidLength() {
value, err := components.ServiceWithInvalidLength()

var actual *errors.ErrInvalidValue

Expand All @@ -34,8 +34,8 @@ func (suite *ServiceValueObjectTestSuite) TestWithInvalidLength() {
suite.EqualError(expected, actual.Error())
}

func (suite *ServiceValueObjectTestSuite) TestWithInvalidAlphanumeric() {
value, err := valueobjs.ServiceWithInvalidAlphanumeric()
func (suite *ServiceTestSuite) TestWithInvalidAlphanumeric() {
value, err := components.ServiceWithInvalidAlphanumeric()

var actual *errors.ErrInvalidValue

Expand All @@ -53,6 +53,6 @@ func (suite *ServiceValueObjectTestSuite) TestWithInvalidAlphanumeric() {
suite.EqualError(expected, actual.Error())
}

func TestUnitServiceValueObjectSuite(t *testing.T) {
suite.Run(t, new(ServiceValueObjectTestSuite))
func TestUnitServiceSuite(t *testing.T) {
suite.Run(t, new(ServiceTestSuite))
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package valueobjs
package components

import (
"github.com/bastean/codexgo/v4/pkg/context/shared/domain/errors"
Expand Down
Loading

0 comments on commit 00528ba

Please sign in to comment.