-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathTransactionsTest.java
More file actions
76 lines (63 loc) · 2.23 KB
/
TransactionsTest.java
File metadata and controls
76 lines (63 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.flutterwave.services;
import com.flutterwave.utility.Environment;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.math.BigDecimal;
import java.util.Optional;
import static com.flutterwave.utility.Properties.getProperty;
import static org.junit.jupiter.api.Assertions.*;
/**
* @author Cleopatra Douglas
*/
class TransactionsTest {
@BeforeEach
void setUp() {
Environment.setSecretKey(getProperty("SEC_KEY"));
Environment.setPublicKey(getProperty("PUB_KEY"));
Environment.setEncryptionKey(getProperty("ENCR_KEY"));
}
@Test
void runVerifyTransaction() {
Assertions.assertEquals("success", new Transactions().runVerifyTransaction(0).getStatus());
}
@Test
void runGetTransactions() {
Assertions.assertEquals("success", new Transactions().runGetTransactions(Optional.empty(),
Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(),
Optional.empty(), Optional.empty()).getStatus());
}
@Test
void runGetTransactionsFees() {
Assertions.assertEquals("success", new Transactions().runGetTransactionsFees(new BigDecimal("10"),
"NGN").getStatus());
}
@Test
void runResendWebhook() {
Assertions.assertEquals("success", new Transactions().runResendWebhook(0,
Optional.empty()).getStatus());
}
@Test
void runViewTimeline() {
Assertions.assertEquals("success", new Transactions().runViewTimeline(0).getStatus());
}
@Test
void rungetRefunds() {
Assertions.assertEquals("success", new Transactions().new Refunds().runGet(
Optional.empty(),
Optional.empty(),
Optional.empty(),
Optional.empty(),
Optional.empty()
).getStatus());
}
@Test
void runRefund() {
Assertions.assertEquals("success", new Transactions().new Refunds().runRefund(0,
Optional.empty()).getStatus());
}
@Test
void runGetDetails() {
Assertions.assertEquals("success", new Transactions().new Refunds().runGetDetails(0).getStatus());
}
}