Skip to content

Commit bf537e1

Browse files
committed
Added token unit tests + Removed stale Mock + stale Transaction Interface"
Signed-off-by: Effi-S <effi.szt@gmail.com>
1 parent d0f95d4 commit bf537e1

6 files changed

Lines changed: 431 additions & 374 deletions

File tree

token/services/tokens/generate.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ package tokens
1010
//go:generate counterfeiter -o mock/tms_provider.go . TMSProvider
1111
//go:generate counterfeiter -o mock/network_provider.go . NetworkProvider
1212
//go:generate counterfeiter -o mock/metadata.go . MetaData
13-
//go:generate counterfeiter -o mock/transaction.go . Transaction
1413
//go:generate counterfeiter -o mock/cache.go . Cache
1514

1615
// External and shared interfaces

token/services/tokens/mock/transaction.go

Lines changed: 0 additions & 353 deletions
This file was deleted.

token/services/tokens/tokens.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,6 @@ type MetaData interface {
3030
SpentTokenID() []*token2.ID
3131
}
3232

33-
// GetTMSProviderFunc is a function type that returns a token management service provider.
34-
type GetTMSProviderFunc = func() *token.ManagementServiceProvider
35-
36-
// UnspendableTokensIterator is an alias for the driver's UnsupportedTokensIterator.
37-
type UnspendableTokensIterator = driver.UnsupportedTokensIterator
38-
39-
// Transaction models a token transaction within Panurus, providing access to its identifiers and request content.
40-
type Transaction interface {
41-
// ID returns the transaction identifier.
42-
ID() string
43-
// Network returns the network name the transaction belongs to.
44-
Network() string
45-
// Channel returns the channel name.
46-
Channel() string
47-
// Namespace returns the namespace (chaincode ID) of the transaction.
48-
Namespace() string
49-
// Request returns the underlying token request.
50-
Request() *token.Request
51-
}
52-
5333
// Cache defines the interface for caching token requests and their extracted actions.
5434
type Cache interface {
5535
// Get retrieves a cache entry by key.

0 commit comments

Comments
 (0)