// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.frontdoor.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.frontdoor.fluent.models.FrontDoorCertificateSourceParameters;
import com.azure.resourcemanager.frontdoor.models.FrontDoorCertificateType;
import org.junit.jupiter.api.Assertions;

public final class FrontDoorCertificateSourceParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FrontDoorCertificateSourceParameters model =
            BinaryData
                .fromString("{\"certificateType\":\"Dedicated\"}")
                .toObject(FrontDoorCertificateSourceParameters.class);
        Assertions.assertEquals(FrontDoorCertificateType.DEDICATED, model.certificateType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FrontDoorCertificateSourceParameters model =
            new FrontDoorCertificateSourceParameters().withCertificateType(FrontDoorCertificateType.DEDICATED);
        model = BinaryData.fromObject(model).toObject(FrontDoorCertificateSourceParameters.class);
        Assertions.assertEquals(FrontDoorCertificateType.DEDICATED, model.certificateType());
    }
}
