blob: b98b2a34bdf1c00cd43ff11c7e1f70474e966ed0 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.azurecompute.xml;
import static org.testng.Assert.assertEquals;
import java.io.InputStream;
import org.jclouds.azurecompute.domain.ServiceCertificate;
import org.jclouds.http.functions.BaseHandlerTest;
import org.testng.annotations.Test;
@Test(groups = "unit", testName = "ServiceCertificateHandlerTest")
public class ServiceCertificateHandlerTest extends BaseHandlerTest {
public void test() {
final InputStream is = getClass().getResourceAsStream("/servicecertificate.xml");
final ServiceCertificate result = factory.create(new ServiceCertificateHandler()).parse(is);
assertEquals(result, expected());
}
public static ServiceCertificate expected() {
return ServiceCertificate.create(
null,
null,
null,
"MIIDyzCCArOgAwIBAgICEAcwDQYJKoZIhvcNAQELBQAwfzELMAkGA1UEBhMCSVQxDjAMBgNVBAgMBUl0YWx5MRAwDgYDVQQHDAdQZXN"
+ "jYXJhMQ8wDQYDVQQKDAZUaXJhc2ExDDAKBgNVBAsMA0lUQzEPMA0GA1UEAwwGVGlyYXNhMR4wHAYJKoZIhvcNAQkBFg9pbmZvQHRp"
+ "cmFzYS5uZXQwHhcNMTUwMzA0MTQ1MzQwWhcNMTYwMzAzMTQ1MzQwWjBVMQswCQYDVQQGEwJJVDEQMA4GA1UECAwHUGVzY2FyYTEPM"
+ "A0GA1UECgwGVGlyYXNhMQswCQYDVQQLDAJBTTEWMBQGA1UEAwwNYW0udGlyYXNhLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADgg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