-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathNonLatinCharacterTest.java
39 lines (32 loc) · 1.18 KB
/
NonLatinCharacterTest.java
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
package com.shippo.model;
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import com.shippo.exception.ShippoException;
public class NonLatinCharacterTest extends ShippoTest {
@Test
public void testCharacterHandlin() {
Address testObject = null;
Map<String, Object> objectMap = new HashMap<String, Object>();
objectMap.put("object_purpose", "QUOTE");
objectMap.put("name", "Πατατα");
objectMap.put("company", "Shippo");
objectMap.put("street1", "Clayton St.");
objectMap.put("street_no", "215");
objectMap.put("street2", null);
objectMap.put("city", "San Francisco");
objectMap.put("state", "CA");
objectMap.put("zip", "94117");
objectMap.put("country", "US");
objectMap.put("phone", "+1 555 341 9393");
objectMap.put("email", "test@goshipppo.com");
objectMap.put("metadata", "Customer ID 123456");
try {
testObject = Address.create(objectMap);
} catch (ShippoException e) {
e.printStackTrace();
}
assertEquals("Πατατα", testObject.getName());
}
}