Skip to content

Commit 3e1ed6f

Browse files
Cleaning tests
1 parent 9824bd7 commit 3e1ed6f

25 files changed

+74
-125
lines changed

pom.xml

Lines changed: 47 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.bandwidth.sdk</groupId>
55
<artifactId>bandwidth-sdk</artifactId>
@@ -33,7 +33,7 @@
3333

3434
<build>
3535
<plugins>
36-
<plugin>
36+
<plugin>
3737
<groupId>org.apache.maven.plugins</groupId>
3838
<artifactId>maven-compiler-plugin</artifactId>
3939
<version>3.10.1</version>
@@ -43,7 +43,7 @@
4343
<maxmem>512m</maxmem>
4444
<compilerArgs>
4545
<arg>-Xlint:all</arg>
46-
<arg>-J-Xss4m</arg><!-- Compiling the generated JSON.java file may require larger stack size. -->
46+
<arg>-J-Xss4m</arg> <!-- Compiling the generated JSON.java file may require larger stack size. -->
4747
</compilerArgs>
4848
<forceJavacCompilerUse>true</forceJavacCompilerUse>
4949
<release>${java.version}</release>
@@ -196,42 +196,42 @@
196196
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
197197
-->
198198
<plugin>
199-
<groupId>com.diffplug.spotless</groupId>
200-
<artifactId>spotless-maven-plugin</artifactId>
201-
<version>${spotless.version}</version>
202-
<configuration>
203-
<formats>
204-
<!-- you can define as many formats as you want, each is independent -->
205-
<format>
206-
<!-- define the files to apply to -->
207-
<includes>
208-
<include>.gitignore</include>
209-
</includes>
210-
<!-- define the steps to apply to those files -->
211-
<trimTrailingWhitespace/>
212-
<endWithNewline/>
213-
<indent>
214-
<spaces>true</spaces> <!-- or <tabs>true</tabs> -->
215-
<spacesPerTab>4</spacesPerTab> <!-- optional, default is 4 -->
216-
</indent>
217-
</format>
218-
</formats>
219-
<!-- define a language-specific format -->
220-
<java>
221-
<!-- no need to specify files, inferred automatically, but you can if you want -->
199+
<groupId>com.diffplug.spotless</groupId>
200+
<artifactId>spotless-maven-plugin</artifactId>
201+
<version>${spotless.version}</version>
202+
<configuration>
203+
<formats>
204+
<!-- you can define as many formats as you want, each is independent -->
205+
<format>
206+
<!-- define the files to apply to -->
207+
<includes>
208+
<include>.gitignore</include>
209+
</includes>
210+
<!-- define the steps to apply to those files -->
211+
<trimTrailingWhitespace/>
212+
<endWithNewline/>
213+
<indent>
214+
<spaces>true</spaces> <!-- or <tabs>true</tabs> -->
215+
<spacesPerTab>4</spacesPerTab> <!-- optional, default is 4 -->
216+
</indent>
217+
</format>
218+
</formats>
219+
<!-- define a language-specific format -->
220+
<java>
221+
<!-- no need to specify files, inferred automatically, but you can if you want -->
222222

223-
<!-- apply a specific flavor of google-java-format and reflow long strings -->
224-
<googleJavaFormat>
225-
<version>1.8</version>
226-
<style>AOSP</style>
227-
<reflowLongStrings>true</reflowLongStrings>
228-
</googleJavaFormat>
223+
<!-- apply a specific flavor of google-java-format and reflow long strings -->
224+
<googleJavaFormat>
225+
<version>1.8</version>
226+
<style>AOSP</style>
227+
<reflowLongStrings>true</reflowLongStrings>
228+
</googleJavaFormat>
229229

230-
<removeUnusedImports/>
231-
<importOrder/>
230+
<removeUnusedImports/>
231+
<importOrder/>
232232

233-
</java>
234-
</configuration>
233+
</java>
234+
</configuration>
235235
</plugin>
236236
</plugins>
237237
</build>
@@ -272,11 +272,11 @@
272272
<version>${jaxb.version}</version>
273273
</dependency>
274274
<dependency>
275-
<groupId>org.projectlombok</groupId>
276-
<artifactId>lombok</artifactId>
277-
<version>1.18.24</version>
278-
<scope>provided</scope>
279-
</dependency>
275+
<groupId>org.projectlombok</groupId>
276+
<artifactId>lombok</artifactId>
277+
<version>1.18.24</version>
278+
<scope>provided</scope>
279+
</dependency>
280280
<dependency>
281281
<groupId>jakarta.xml.bind</groupId>
282282
<artifactId>jakarta.xml.bind-api</artifactId>
@@ -384,16 +384,14 @@
384384
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
385385
<spotless.version>2.21.0</spotless.version>
386386
</properties>
387-
388-
389387
<dependencyManagement>
390388
<dependencies>
391389
<dependency>
392-
<groupId>org.projectlombok</groupId>
393-
<artifactId>lombok</artifactId>
394-
<version>1.18.24</version>
395-
<scope>provided</scope>
396-
</dependency>
390+
<groupId>org.projectlombok</groupId>
391+
<artifactId>lombok</artifactId>
392+
<version>1.18.24</version>
393+
<scope>provided</scope>
394+
</dependency>
397395
</dependencies>
398396
</dependencyManagement>
399397
</project>

src/test/java/org/openapitools/client/model/unit/bxml/BridgeVerbTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ public class BridgeVerbTest {
2626
.bridgeCompleteUrl("https://example.com")
2727
.tag("test")
2828
.build();
29-
public JAXBContext jaxbContext;
3029

3130
@Test
3231
public void bridgeVerbWorks() throws JAXBException {
33-
jaxbContext = JAXBContext.newInstance(Bxml.class);
32+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
3433
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><Bridge bridgeCompleteUrl=\"https://example.com\" bridgeCompleteMethod=\"POST\" bridgeCompleteFallbackMethod=\"POST\" bridgeTargetCompleteMethod=\"POST\" bridgeTargetCompleteFallbackMethod=\"POST\" tag=\"test\">+19198675309</Bridge></Bxml>";
3534

3635
assertThat(new Bxml().with(bridge).toBxml(jaxbContext), is(expectedBxml));

src/test/java/org/openapitools/client/model/unit/bxml/BxmlVerbTest.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ public class BxmlVerbTest {
3131
Tag tag = new Tag("Test Tag Content");
3232
Bxml bxml2 = new Bxml().with(tag);
3333

34-
public JAXBContext jaxbContext;
35-
3634
@Test
3735
public void toBxmlWorks() throws JAXBException {
38-
jaxbContext = JAXBContext.newInstance(Bxml.class);
36+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
3937
Bxml bxml = new Bxml().with(new Tag("Test"));
4038
Tag tag = new Tag("Test Tag Content");
4139
Bxml bxml2 = new Bxml().with(tag);
@@ -61,14 +59,4 @@ public void withVerbsWorks() {
6159
assertThat(bxml.getVerbs().get(0), is(pause));
6260
assertThat(bxml.getVerbs().get(1), is(sendDtmf));
6361
}
64-
65-
@Test
66-
public void toBxmlWithDiversionWorks() throws JAXBException {
67-
jaxbContext = JAXBContext.newInstance(Bxml.class);
68-
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><Forward callTimeout=\"300.0\" diversionTreatment=\"NONE\" diversionReason=\"DO_NOT_DISTURB\"/></Bxml>";
69-
Bxml bxml = new Bxml().with(Forward.builder()
70-
.diversionReason(DiversionReason.DO_NOT_DISTURB)
71-
.build());
72-
assertThat(bxml.toBxml(jaxbContext), is(expectedBxml));
73-
}
7462
};

src/test/java/org/openapitools/client/model/unit/bxml/ConferenceVerbTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ public class ConferenceVerbTest {
3939
.tag("tag")
4040
.callbackTimeout(5d)
4141
.build();
42-
public JAXBContext jaxbContext;
4342

4443
@Test
4544
public void conferenceVerbWorks() throws JAXBException {
46-
jaxbContext = JAXBContext.newInstance(Bxml.class);
45+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
4746
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><Conference mute=\"true\" hold=\"false\" conferenceEventUrl=\"example.com/eventurl\" conferenceEventMethod=\"POST\" conferenceEventFallbackUrl=\"backupexample.com/eventurl\" conferenceEventFallbackMethod=\"POST\" callbackTimeout=\"5.0\" tag=\"tag\" username=\"user\" password=\"pass\" fallbackUsername=\"user\" fallbackPassword=\"pass\" callIdsToCoach=\"example-call-id\">conf1</Conference></Bxml>";
4847

4948
assertThat(new Bxml().with(conference).toBxml(jaxbContext), is(expectedBxml));

src/test/java/org/openapitools/client/model/unit/bxml/ForwardVerbTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ public class ForwardVerbTest {
3333
.diversionReason(DiversionReason.AWAY)
3434
.uui("93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt")
3535
.build();
36-
public JAXBContext jaxbContext;
3736

3837
@Test
3938
public void forwardVerbWorks() throws JAXBException {
40-
jaxbContext = JAXBContext.newInstance(Bxml.class);
39+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
4140
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><Forward to=\"+19195554321\" from=\"19195554322\" uui=\"93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt\" callTimeout=\"15.0\" diversionTreatment=\"PROPAGATE\" diversionReason=\"AWAY\"/></Bxml>";
4241

4342
assertThat(new Bxml().with(forward).toBxml(jaxbContext), is(expectedBxml));

src/test/java/org/openapitools/client/model/unit/bxml/GatherVerbTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ public class GatherVerbTest {
4949
.children(List.of(playAudio, speakSentence))
5050
.build();
5151

52-
public JAXBContext jaxbContext;
53-
54-
5552
@Test
5653
public void gatherVerbWorks() throws JAXBException {
57-
jaxbContext = JAXBContext.newInstance(Bxml.class);
54+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
5855
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><Gather gatherUrl=\"test.com\" gatherFallbackUrl=\"fallback-test.com\" gatherMethod=\"POST\" gatherFallbackMethod=\"GET\" username=\"user\" password=\"pass\" fallbackUsername=\"user\" fallbackPassword=\"pass\" tag=\"tag\" terminatingDigits=\"2\" maxDigits=\"5\" firstDigitTimeout=\"3.0\" interDigitTimeout=\"1.0\" repeatCount=\"2\"><PlayAudio>test.com</PlayAudio><SpeakSentence gender=\"female\" locale=\"en_US\">Hello. Your number is &lt;say-as interpret-as=\"telephone\"&gt;asdf&lt;/say-as&gt;, lets play a game. What is 10 + 3. Press the pound key when finished.</SpeakSentence></Gather></Bxml>";
5956

6057
assertThat(new Bxml().with(gather).toBxml(jaxbContext), is(expectedBxml));

src/test/java/org/openapitools/client/model/unit/bxml/HangupVerbTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818
import static org.hamcrest.MatcherAssert.assertThat;
1919
import static org.hamcrest.Matchers.is;
2020
public class HangupVerbTest {
21-
public JAXBContext jaxbContext;
2221

2322
@Test
2423
public void hangupVerbWorks() throws JAXBException {
25-
jaxbContext = JAXBContext.newInstance(Bxml.class);
24+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
2625
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><Hangup/></Bxml>";
2726

2827
assertThat(new Bxml().with(new Hangup()).toBxml(jaxbContext), is(expectedBxml));

src/test/java/org/openapitools/client/model/unit/bxml/PauseRecordingVerbTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
import static org.hamcrest.Matchers.is;
2020

2121
public class PauseRecordingVerbTest {
22-
public JAXBContext jaxbContext;
2322

2423
@Test
2524
public void pauseRecordingVerbWorks() throws JAXBException {
26-
jaxbContext = JAXBContext.newInstance(Bxml.class);
25+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
2726
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><PauseRecording/></Bxml>";
2827

2928
assertThat(new Bxml().with(new PauseRecording()).toBxml(jaxbContext), is(expectedBxml));

src/test/java/org/openapitools/client/model/unit/bxml/PauseVerbTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818
import static org.hamcrest.MatcherAssert.assertThat;
1919
import static org.hamcrest.Matchers.is;
2020
public class PauseVerbTest {
21-
public JAXBContext jaxbContext;
2221

2322
@Test
2423
public void pauseVerbWorks() throws JAXBException {
25-
jaxbContext = JAXBContext.newInstance(Bxml.class);
24+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
2625
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><Pause duration=\"2.0\"/></Bxml>";
2726

2827
assertThat(new Bxml().with(new Pause(2d)).toBxml(jaxbContext), is(expectedBxml));

src/test/java/org/openapitools/client/model/unit/bxml/PlayAudioVerbTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ public class PlayAudioVerbTest {
2828
.username("user")
2929
.password("pass")
3030
.build();
31-
public JAXBContext jaxbContext;
3231

3332
@Test
3433
public void playAudioVerbWorks() throws JAXBException {
35-
jaxbContext = JAXBContext.newInstance(Bxml.class);
34+
JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class);
3635
String expectedBxml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Bxml><PlayAudio username=\"user\" password=\"pass\">test.com</PlayAudio></Bxml>";
3736

3837
assertThat(new Bxml().with(playAudio).toBxml(jaxbContext), is(expectedBxml));

0 commit comments

Comments
 (0)