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

package com.azure.resourcemanager.devhub.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.devhub.models.Acr;
import org.junit.jupiter.api.Assertions;

public final class AcrTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Acr model =
            BinaryData
                .fromString(
                    "{\"acrSubscriptionId\":\"x\",\"acrResourceGroup\":\"jpgd\",\"acrRegistryName\":\"ocjjxhvpmouexh\",\"acrRepositoryName\":\"xibqeojnx\"}")
                .toObject(Acr.class);
        Assertions.assertEquals("x", model.acrSubscriptionId());
        Assertions.assertEquals("jpgd", model.acrResourceGroup());
        Assertions.assertEquals("ocjjxhvpmouexh", model.acrRegistryName());
        Assertions.assertEquals("xibqeojnx", model.acrRepositoryName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Acr model =
            new Acr()
                .withAcrSubscriptionId("x")
                .withAcrResourceGroup("jpgd")
                .withAcrRegistryName("ocjjxhvpmouexh")
                .withAcrRepositoryName("xibqeojnx");
        model = BinaryData.fromObject(model).toObject(Acr.class);
        Assertions.assertEquals("x", model.acrSubscriptionId());
        Assertions.assertEquals("jpgd", model.acrResourceGroup());
        Assertions.assertEquals("ocjjxhvpmouexh", model.acrRegistryName());
        Assertions.assertEquals("xibqeojnx", model.acrRepositoryName());
    }
}
