Skip to content

Commit

Permalink
add test for void transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
brianarnold789 committed Dec 7, 2017
1 parent 6f4102b commit ea5ad03
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/functionalTest/java/com/cnp/sdk/TestVoid.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.cnp.sdk;

import com.cnp.sdk.generate.*;
import com.cnp.sdk.generate.Void;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class TestVoid {

private static CnpOnline cnp;

@BeforeClass
public static void beforeClass() throws Exception {
cnp = new CnpOnline();
}

@Test
public void simpleVoid() throws Exception {
Void voidTxn = new Void();
voidTxn.setCnpTxnId(102948757348543643L);
voidTxn.setReportGroup("Planets");
voidTxn.setId("new_ID");
voidTxn.setCustomerId("my_customer");

VoidResponse response = cnp.dovoid(voidTxn);
assertEquals("000",response.getResponse());
}
}

0 comments on commit ea5ad03

Please sign in to comment.