Skip to content

Commit

Permalink
Clean test code (jongio#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
srnagar authored and jongio committed Jan 28, 2020
1 parent 4ecde2e commit 06a4db5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
import com.azure.identity.DefaultAzureCredential;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.microsoft.azure.servicebus.primitives.ServiceBusException;
import com.microsoft.azure.servicebus.security.DefaultAzureServiceBusCredential;
import com.jongallant.azure.identity.extensions.DefaultAzureServiceBusCredential;
import org.junit.Test;

public class DefaultAzureServiceBusCredentialTest {

@Test
public void testDefaultCredential() throws ServiceBusException, InterruptedException {
DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilder().build();
TopicClient topicClient = new TopicClient("jongsb2", "srnagartopic",
new ClientSettings(new DefaultAzureServiceBusCredential()));

topicClient.send(new Message("hello"));
topicClient.close();
}
}

0 comments on commit 06a4db5

Please sign in to comment.