-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f4102b
commit ea5ad03
Showing
1 changed file
with
30 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
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()); | ||
} | ||
} |