Skip to content

Commit

Permalink
roll back azure common lib (#22165)
Browse files Browse the repository at this point in the history
  • Loading branch information
arifsaikat-microsoft authored and chrwhit committed Jun 10, 2021
1 parent 2f47b2e commit 01e8aa3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions sdk/communication/azure-communication-callingserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-common</artifactId>
<version>1.0.2</version> <!-- {x-version-update;com.azure:azure-communication-common;current} -->
<version>1.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-communication-common;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down Expand Up @@ -115,7 +115,7 @@
<includes>
<include>com/azure/communication/callingserver/*.class</include>
</includes>
</configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void buildPiplineForClient() {
@Test
public void setHttpLogOptions() {
HttpLogOptions options = new HttpLogOptions().setApplicationId(APPLICATION_ID);
CallAsyncClient callAsyncClient = builder
CallingServerAsyncClient callAsyncClient = builder
.connectionString(MOCK_CONNECTION_STRING)
.httpLogOptions(options)
.httpClient(new NoOpHttpClient())
Expand All @@ -135,27 +135,27 @@ public void setHttpLogOptions() {
@Test
public void setClientOptions() {
ClientOptions options = new ClientOptions().setApplicationId(APPLICATION_ID);
CallAsyncClient callAsyncClient = builder
CallingServerAsyncClient callAsyncClient = builder
.connectionString(MOCK_CONNECTION_STRING)
.clientOptions(options)
.httpClient(new NoOpHttpClient())
.buildAsyncClient();
assertNotNull(callAsyncClient);
}
}

@Test
public void noClientOptionsNoPipeline() {
CallAsyncClient callAsyncClient = builder
CallingServerAsyncClient callAsyncClient = builder
.connectionString(MOCK_CONNECTION_STRING)
.httpClient(new NoOpHttpClient())
.buildAsyncClient();
assertNotNull(callAsyncClient);
}
}

@Test
public void addPolicy() {
AzureKeyCredential credential = new AzureKeyCredential("key");
CallAsyncClient callAsyncClient = builder
CallingServerAsyncClient callAsyncClient = builder
.connectionString(MOCK_CONNECTION_STRING)
.addPolicy(new HmacAuthenticationPolicy(credential))
.httpClient(new NoOpHttpClient())
Expand All @@ -166,19 +166,19 @@ public void addPolicy() {

@Test
public void argumentExceptionOnConnectionStringAndEndpoint() {
assertThrows(IllegalArgumentException.class, () -> {
assertThrows(IllegalArgumentException.class, () -> {
builder
.connectionString(MOCK_CONNECTION_STRING)
.endpoint(MOCK_URL)
.httpClient(new NoOpHttpClient())
.buildAsyncClient();
});
}

@Test
public void argumentExceptionOnConnectionStringAndAzureKeyCredential() {
AzureKeyCredential credential = new AzureKeyCredential("key");
assertThrows(IllegalArgumentException.class, () -> {
assertThrows(IllegalArgumentException.class, () -> {
builder
.connectionString(MOCK_CONNECTION_STRING)
.credential(credential)
Expand All @@ -190,7 +190,7 @@ public void argumentExceptionOnConnectionStringAndAzureKeyCredential() {
@Test
public void argumentExceptionOnConnectionStringAndTokenCredential() {
TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
assertThrows(IllegalArgumentException.class, () -> {
assertThrows(IllegalArgumentException.class, () -> {
builder
.connectionString(MOCK_CONNECTION_STRING)
.credential(tokenCredential)
Expand All @@ -203,19 +203,19 @@ public void argumentExceptionOnConnectionStringAndTokenCredential() {
public void argumentExceptionOnAzureKeyCredentialAndTokenCredential() {
AzureKeyCredential credential = new AzureKeyCredential("key");
TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
assertThrows(IllegalArgumentException.class, () -> {
assertThrows(IllegalArgumentException.class, () -> {
builder
.credential(credential)
.credential(tokenCredential)
.httpClient(new NoOpHttpClient())
.buildAsyncClient();
});
});
}

@Test
public void noPipelineWithToken() {
TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
CallAsyncClient callAsyncClient = builder
TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
CallingServerAsyncClient callAsyncClient = builder
.endpoint(MOCK_URL)
.credential(tokenCredential)
.httpClient(new NoOpHttpClient())
Expand All @@ -226,7 +226,7 @@ public void noPipelineWithToken() {

@Test
public void noCredential() {
assertThrows(IllegalArgumentException.class, () -> {
assertThrows(IllegalArgumentException.class, () -> {
builder
.endpoint(MOCK_URL)
.httpClient(new NoOpHttpClient())
Expand All @@ -236,11 +236,11 @@ public void noCredential() {

@Test
public void noEndpoint() {
assertThrows(NullPointerException.class, () -> {
assertThrows(NullPointerException.class, () -> {
builder
.httpClient(new NoOpHttpClient())
.buildAsyncClient();
});
}
}
}

0 comments on commit 01e8aa3

Please sign in to comment.