-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from brokeyourbike/missing
Implement missing API method
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package webhook_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/brokeyourbike/clearbank-api-client-go/webhook" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestMCCYAccountCreatedPayload_GetIdentifier(t *testing.T) { | ||
p1 := webhook.MCCYAccountCreatedPayload{} | ||
assert.Equal(t, "", p1.GetIdentifier()) | ||
|
||
p2 := webhook.MCCYAccountCreatedPayload{Identifiers: []webhook.MCCYIdentifier{{Identifier: "A"}, {Identifier: "B"}}} | ||
assert.Equal(t, "A", p2.GetIdentifier()) | ||
} | ||
|
||
func TestMCCYAccountUpdatedPayload_GetIdentifier(t *testing.T) { | ||
p1 := webhook.MCCYAccountUpdatedPayload{} | ||
assert.Equal(t, "", p1.GetIdentifier()) | ||
|
||
p2 := webhook.MCCYAccountUpdatedPayload{Identifiers: []webhook.MCCYIdentifier{{Identifier: "A"}, {Identifier: "B"}}} | ||
assert.Equal(t, "A", p2.GetIdentifier()) | ||
} | ||
|
||
func TestMCCYVirtualAccountCreatedPayload_GetIdentifier(t *testing.T) { | ||
p1 := webhook.MCCYVirtualAccountCreatedPayload{} | ||
assert.Equal(t, "", p1.GetIdentifier()) | ||
|
||
p2 := webhook.MCCYVirtualAccountCreatedPayload{Identifiers: []webhook.MCCYIdentifier{{Identifier: "A"}, {Identifier: "B"}}} | ||
assert.Equal(t, "A", p2.GetIdentifier()) | ||
} | ||
|
||
func TestMCCYVirtualAccountUpdatedPayload_GetIdentifier(t *testing.T) { | ||
p1 := webhook.MCCYVirtualAccountUpdatedPayload{} | ||
assert.Equal(t, "", p1.GetIdentifier()) | ||
|
||
p2 := webhook.MCCYVirtualAccountUpdatedPayload{Identifiers: []webhook.MCCYIdentifier{{Identifier: "A"}, {Identifier: "B"}}} | ||
assert.Equal(t, "A", p2.GetIdentifier()) | ||
} |