forked from AuthorizeNet/sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderTest.java
More file actions
38 lines (28 loc) · 887 Bytes
/
OrderTest.java
File metadata and controls
38 lines (28 loc) · 887 Bytes
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
package net.authorize.data;
import junit.framework.Assert;
import net.authorize.UnitTestData;
import net.authorize.data.Order;
import net.authorize.data.OrderItem;
import org.junit.Before;
import org.junit.Test;
public class OrderTest extends UnitTestData {
private Order order;
@Before
public void setUp() {
this.order = Order.createOrder();
}
@Test
public void createOrder() {
Assert.assertNotNull(this.order);
}
@Test
public void checkOrderFields() {
this.order.setDescription(orderDescription);
this.order.setInvoiceNumber(invoiceNumber);
this.order.addOrderItem(OrderItem.createOrderItem());
this.order.addOrderItem(OrderItem.createOrderItem());
Assert.assertEquals(orderDescription, this.order.getDescription());
Assert.assertEquals(invoiceNumber, this.order.getInvoiceNumber());
Assert.assertEquals(2, this.order.getOrderItems().size());
}
}