Skip to content

Commit 7b84a67

Browse files
[dialog] Added integration test to validate watson-developer-cloud#206
1 parent 5756e6e commit 7b84a67

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/test/java/com/ibm/watson/developer_cloud/dialog/v1/DialogServiceIT.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import org.apache.commons.lang3.time.DateUtils;
3030
import org.junit.Before;
31+
import org.junit.Ignore;
3132
import org.junit.Test;
3233

3334
import com.ibm.watson.developer_cloud.WatsonServiceTest;
@@ -134,6 +135,27 @@ public void testGetContent() {
134135
assertNotNull(content);
135136
}
136137

138+
/**
139+
* Test profile variable encoding.
140+
*/
141+
@Test
142+
@Ignore
143+
public void testProfileVariableEncoding() {
144+
String variable = "size", value = "Germán";
145+
146+
// start a conversation
147+
Conversation c = service.createConversation(dialogId);
148+
149+
// update profile with a non-ascii value
150+
Map<String, String> profile = new HashMap<String,String >();
151+
profile.put(variable, value);
152+
service.updateProfile(dialogId, c.getClientId(), profile);
153+
154+
// verify that value is equal to the one in the profile
155+
profile = service.getProfile(dialogId, c.getClientId(), variable);
156+
assertEquals(profile.get(variable), value);
157+
}
158+
137159
/**
138160
* Test converse with nulls.
139161
*/

0 commit comments

Comments
 (0)