use of com.microsoft.azure.sdk.iot.service.ServiceAuthenticationWithSharedAccessPolicyToken in project azure-iot-sdk-java by Azure.
the class AuthenticationMethodTest method getAuthenticationMethodSharedAccessToken.
/**
* Test of ServiceAuthenticationWithSharedAccessPolicyToken class.
* Create and get
*/
@Test
public void getAuthenticationMethodSharedAccessToken() throws Exception {
// Arrange
String policyName = "SharedAccessKey";
String sharedAccessToken = "1234567890abcdefghijklmnopqrstvwxyz=";
// Act
ServiceAuthenticationWithSharedAccessPolicyToken serviceAuthenticationWithSharedAccessPolicyToken = new ServiceAuthenticationWithSharedAccessPolicyToken(policyName, sharedAccessToken);
// Assert
assertEquals("PolicyName mismatch!", policyName, serviceAuthenticationWithSharedAccessPolicyToken.getPolicyName());
assertEquals("SharedAccessToken mismatch!", sharedAccessToken, serviceAuthenticationWithSharedAccessPolicyToken.getToken());
}
Aggregations