Skip to content

Commit 38dfc0a

Browse files
Merge pull request #53 from Bandwidth/DX-2288-AnswerCall-Fix
DX-2288 Fixed AnswerCall Attribute Of Ring BXML Verb
2 parents 5bcb72f + 14adad1 commit 38dfc0a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/main/java/com/bandwidth/voice/bxml/verbs/Ring.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ public class Ring implements Verb {
2525
* incoming call. Default value is 'true'.
2626
*/
2727
@XmlAttribute
28-
private boolean answerCall;
28+
private Boolean answerCall;
2929
}

src/test/java/com/bandwidth/BxmlTest.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public void testNestedGatherMultipleVerbs() {
165165

166166
assertEquals("BXML strings not equal", expected, response);
167167
}
168-
168+
169169
@Test
170170
public void testNestedGatherSingleVerb() {
171171
SpeakSentence speakSentence = SpeakSentence.builder()
@@ -442,6 +442,16 @@ public void testRing() {
442442
assertEquals("BXML strings not equal", expected, response);
443443
}
444444

445+
@Test
446+
public void testRingDefault() {
447+
Ring ring = Ring.builder().build();
448+
String response = new Response().add(ring).toBXML();
449+
450+
String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Ring/></Response>";
451+
452+
assertEquals("BXML strings not equal", expected, response);
453+
}
454+
445455
@Test
446456
public void testStopGather() {
447457
StopGather stopGather = StopGather.builder().build();

0 commit comments

Comments
 (0)