-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robert Laszczak
committed
Oct 24, 2017
1 parent
4110b71
commit ee84b70
Showing
7 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
examples/invalid-infrastructure-to-app-import-in-tests/app/product.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package app | ||
|
||
type Product struct {} | ||
|
||
func NewProduct() *Product { | ||
return &Product{} | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/invalid-infrastructure-to-app-import-in-tests/app/product_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package app_test | ||
|
||
import ( | ||
"testing" | ||
"github.com/roblaszczak/go-cleanarch/examples/invalid-infrastructure-to-app-import-in-tests/infrastructure" | ||
"github.com/roblaszczak/go-cleanarch/examples/invalid-infrastructure-to-app-import-in-tests/app" | ||
) | ||
|
||
func TestNewProduct(t *testing.T) { | ||
repo := infrastructure.ProductMemoryRepo{} | ||
|
||
product := app.NewProduct() | ||
repo.Add(product) | ||
} |
10 changes: 10 additions & 0 deletions
10
examples/invalid-infrastructure-to-app-import-in-tests/infrastructure/product.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package infrastructure | ||
|
||
import "github.com/roblaszczak/go-cleanarch/examples/invalid-infrastructure-to-app-import-in-tests/app" | ||
|
||
// ProductMemoryRepo is imported in domain.Product tests. | ||
type ProductMemoryRepo struct {} | ||
|
||
func (p *ProductMemoryRepo) Add(product *app.Product) { | ||
// ... | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters