Skip to content

Commit

Permalink
Merge pull request #53 from Bandwidth/DX-2288-AnswerCall-Fix
Browse files Browse the repository at this point in the history
DX-2288 Fixed AnswerCall Attribute Of Ring BXML Verb
  • Loading branch information
abaldwin-Bandwidth authored Oct 28, 2021
2 parents 5bcb72f + 14adad1 commit 38dfc0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/bandwidth/voice/bxml/verbs/Ring.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public class Ring implements Verb {
* incoming call. Default value is 'true'.
*/
@XmlAttribute
private boolean answerCall;
private Boolean answerCall;
}
12 changes: 11 additions & 1 deletion src/test/java/com/bandwidth/BxmlTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void testNestedGatherMultipleVerbs() {

assertEquals("BXML strings not equal", expected, response);
}

@Test
public void testNestedGatherSingleVerb() {
SpeakSentence speakSentence = SpeakSentence.builder()
Expand Down Expand Up @@ -442,6 +442,16 @@ public void testRing() {
assertEquals("BXML strings not equal", expected, response);
}

@Test
public void testRingDefault() {
Ring ring = Ring.builder().build();
String response = new Response().add(ring).toBXML();

String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Ring/></Response>";

assertEquals("BXML strings not equal", expected, response);
}

@Test
public void testStopGather() {
StopGather stopGather = StopGather.builder().build();
Expand Down

0 comments on commit 38dfc0a

Please sign in to comment.