Skip to content

Commit

Permalink
fix tests with msg stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronc committed Feb 7, 2024
1 parent 809c089 commit fe74b46
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 0 deletions.
29 changes: 29 additions & 0 deletions x/ecocredit/base/types/v1/msg_create_unregistered_project.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package v1

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
)

var _ legacytx.LegacyMsg = &MsgCreateUnregisteredProject{}

// Route implements the LegacyMsg interface.
func (m *MsgCreateUnregisteredProject) Route() string { return sdk.MsgTypeURL(m) }

Check warning on line 11 in x/ecocredit/base/types/v1/msg_create_unregistered_project.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_create_unregistered_project.go#L11

Added line #L11 was not covered by tests

// Type implements the LegacyMsg interface.
func (m *MsgCreateUnregisteredProject) Type() string { return sdk.MsgTypeURL(m) }

Check warning on line 14 in x/ecocredit/base/types/v1/msg_create_unregistered_project.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_create_unregistered_project.go#L14

Added line #L14 was not covered by tests

// GetSignBytes implements the LegacyMsg interface.
func (m *MsgCreateUnregisteredProject) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m))

Check warning on line 18 in x/ecocredit/base/types/v1/msg_create_unregistered_project.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_create_unregistered_project.go#L17-L18

Added lines #L17 - L18 were not covered by tests
}

// ValidateBasic does a sanity check on the provided data.
func (m *MsgCreateUnregisteredProject) ValidateBasic() error {
panic("implement me")

Check warning on line 23 in x/ecocredit/base/types/v1/msg_create_unregistered_project.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_create_unregistered_project.go#L22-L23

Added lines #L22 - L23 were not covered by tests
}

// GetSigners returns the expected signers for MsgCreateUnregisteredProject.
func (m *MsgCreateUnregisteredProject) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Admin)}

Check warning on line 28 in x/ecocredit/base/types/v1/msg_create_unregistered_project.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_create_unregistered_project.go#L27-L28

Added lines #L27 - L28 were not covered by tests
}
29 changes: 29 additions & 0 deletions x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package v1

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
)

var _ legacytx.LegacyMsg = &MsgEvaluateProjectEnrollment{}

// Route implements the LegacyMsg interface.
func (m *MsgEvaluateProjectEnrollment) Route() string { return sdk.MsgTypeURL(m) }

Check warning on line 11 in x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go#L11

Added line #L11 was not covered by tests

// Type implements the LegacyMsg interface.
func (m *MsgEvaluateProjectEnrollment) Type() string { return sdk.MsgTypeURL(m) }

Check warning on line 14 in x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go#L14

Added line #L14 was not covered by tests

// GetSignBytes implements the LegacyMsg interface.
func (m *MsgEvaluateProjectEnrollment) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m))

Check warning on line 18 in x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go#L17-L18

Added lines #L17 - L18 were not covered by tests
}

// ValidateBasic does a sanity check on the provided data.
func (m *MsgEvaluateProjectEnrollment) ValidateBasic() error {
panic("implement me")

Check warning on line 23 in x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go#L22-L23

Added lines #L22 - L23 were not covered by tests
}

// GetSigners returns the expected signers for MsgEvaluateProjectEnrollment.
func (m *MsgEvaluateProjectEnrollment) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Issuer)}

Check warning on line 28 in x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_evaluate_project_enrollment.go#L27-L28

Added lines #L27 - L28 were not covered by tests
}
29 changes: 29 additions & 0 deletions x/ecocredit/base/types/v1/msg_update_project_enrollment.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package v1

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
)

var _ legacytx.LegacyMsg = &MsgUpdateProjectEnrollment{}

// Route implements the LegacyMsg interface.
func (m *MsgUpdateProjectEnrollment) Route() string { return sdk.MsgTypeURL(m) }

Check warning on line 11 in x/ecocredit/base/types/v1/msg_update_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_update_project_enrollment.go#L11

Added line #L11 was not covered by tests

// Type implements the LegacyMsg interface.
func (m *MsgUpdateProjectEnrollment) Type() string { return sdk.MsgTypeURL(m) }

Check warning on line 14 in x/ecocredit/base/types/v1/msg_update_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_update_project_enrollment.go#L14

Added line #L14 was not covered by tests

// GetSignBytes implements the LegacyMsg interface.
func (m *MsgUpdateProjectEnrollment) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m))

Check warning on line 18 in x/ecocredit/base/types/v1/msg_update_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_update_project_enrollment.go#L17-L18

Added lines #L17 - L18 were not covered by tests
}

// ValidateBasic does a sanity check on the provided data.
func (m *MsgUpdateProjectEnrollment) ValidateBasic() error {
panic("implement me")

Check warning on line 23 in x/ecocredit/base/types/v1/msg_update_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_update_project_enrollment.go#L22-L23

Added lines #L22 - L23 were not covered by tests
}

// GetSigners returns the expected signers for MsgUpdateProjectEnrollment.
func (m *MsgUpdateProjectEnrollment) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.ProjectAdmin)}

Check warning on line 28 in x/ecocredit/base/types/v1/msg_update_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_update_project_enrollment.go#L27-L28

Added lines #L27 - L28 were not covered by tests
}
29 changes: 29 additions & 0 deletions x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package v1

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
)

var _ legacytx.LegacyMsg = &MsgWithdrawProjectEnrollment{}

// Route implements the LegacyMsg interface.
func (m *MsgWithdrawProjectEnrollment) Route() string { return sdk.MsgTypeURL(m) }

Check warning on line 11 in x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go#L11

Added line #L11 was not covered by tests

// Type implements the LegacyMsg interface.
func (m *MsgWithdrawProjectEnrollment) Type() string { return sdk.MsgTypeURL(m) }

Check warning on line 14 in x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go#L14

Added line #L14 was not covered by tests

// GetSignBytes implements the LegacyMsg interface.
func (m *MsgWithdrawProjectEnrollment) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m))

Check warning on line 18 in x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go#L17-L18

Added lines #L17 - L18 were not covered by tests
}

// ValidateBasic does a sanity check on the provided data.
func (m *MsgWithdrawProjectEnrollment) ValidateBasic() error {
panic("implement me")

Check warning on line 23 in x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go#L22-L23

Added lines #L22 - L23 were not covered by tests
}

// GetSigners returns the expected signers for MsgWithdrawProjectEnrollment.
func (m *MsgWithdrawProjectEnrollment) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.ProjectAdmin)}

Check warning on line 28 in x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go

View check run for this annotation

Codecov / codecov/patch

x/ecocredit/base/types/v1/msg_withdraw_project_enrollment.go#L27-L28

Added lines #L27 - L28 were not covered by tests
}

0 comments on commit fe74b46

Please sign in to comment.