Skip to content

Commit

Permalink
Increase Test Coverage
Browse files Browse the repository at this point in the history
Increase Test Coverage
  • Loading branch information
bkmoovio committed Nov 26, 2018
1 parent 384ebcc commit f9471f7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
3 changes: 1 addition & 2 deletions batchACK_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,9 @@ func TestBatchACKAddendum99Category(t *testing.T) {
}
}

// TestBatchACKValidTranCodeForServiceClassCode validates A transactionCode based on ServiceClassCode
// TestBatchACKValidTranCodeForServiceClassCode validates a transactionCode based on ServiceClassCode
func TestBatchACKValidTranCodeForServiceClassCode(t *testing.T) {
mockBatch := mockBatchACK()
// Adding a second addenda to the mock entry
mockBatch.GetHeader().ServiceClassCode = 225
if err := mockBatch.Create(); err != nil {
if e, ok := err.(*BatchError); ok {
Expand Down
3 changes: 1 addition & 2 deletions batchATX_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,9 @@ func TestBatchATXAddendum99(t *testing.T) {
}
}

// TestBatchATXValidTranCodeForServiceClassCode validates A transactionCode based on ServiceClassCode
// TestBatchATXValidTranCodeForServiceClassCode validates a transactionCode based on ServiceClassCode
func TestBatchATXValidTranCodeForServiceClassCode(t *testing.T) {
mockBatch := mockBatchATX()
// Adding a second addenda to the mock entry
mockBatch.GetHeader().ServiceClassCode = 225
if err := mockBatch.Create(); err != nil {
if e, ok := err.(*BatchError); ok {
Expand Down
3 changes: 1 addition & 2 deletions batchPPD_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,9 @@ func TestBatchPPDSEC(t *testing.T) {
}
}

// TestBatchPPDValidTranCodeForServiceClassCode validates A transactionCode based on ServiceClassCode
// TestBatchPPDValidTranCodeForServiceClassCode validates a transactionCode based on ServiceClassCode
func TestBatchPPDValidTranCodeForServiceClassCode(t *testing.T) {
mockBatch := mockBatchPPD()
// Adding a second addenda to the mock entry
mockBatch.GetHeader().ServiceClassCode = 225
if err := mockBatch.Create(); err != nil {
if e, ok := err.(*BatchError); ok {
Expand Down
15 changes: 15 additions & 0 deletions batchTEL_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,18 @@ func TestBatchTELAddendum99(t *testing.T) {
}
}
}

// TestBatchTELValidTranCodeForServiceClassCode validates a transactionCode based on ServiceClassCode
func TestBatchTELValidTranCodeForServiceClassCode(t *testing.T) {
mockBatch := mockBatchTEL()
mockBatch.GetHeader().ServiceClassCode = 220
if err := mockBatch.Create(); err != nil {
if e, ok := err.(*BatchError); ok {
if e.FieldName != "TransactionCode" {
t.Errorf("%T: %s", err, err)
}
} else {
t.Errorf("%T: %s", err, err)
}
}
}
3 changes: 1 addition & 2 deletions batchWEB_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,9 @@ func TestBatchWEBCategoryReturnAddenda98(t *testing.T) {
}
}

// TestBatchWEBValidTranCodeForServiceClassCode validates A transactionCode based on ServiceClassCode
// TestBatchWEBValidTranCodeForServiceClassCode validates a transactionCode based on ServiceClassCode
func TestBatchWEBValidTranCodeForServiceClassCode(t *testing.T) {
mockBatch := mockBatchWEB()
// Adding a second addenda to the mock entry
mockBatch.GetHeader().ServiceClassCode = 225
if err := mockBatch.Create(); err != nil {
if e, ok := err.(*BatchError); ok {
Expand Down

0 comments on commit f9471f7

Please sign in to comment.