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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.ApiResourceGeneralInformation;
import com.azure.resourcemanager.logic.models.ApiTier;
import org.junit.jupiter.api.Assertions;

public final class ApiResourceGeneralInformationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApiResourceGeneralInformation model =
            BinaryData
                .fromString(
                    "{\"iconUrl\":\"ioovzidsxwaab\",\"displayName\":\"ifrygzn\",\"description\":\"axri\",\"termsOfUseUrl\":\"zob\",\"releaseTag\":\"pxl\",\"tier\":\"Standard\"}")
                .toObject(ApiResourceGeneralInformation.class);
        Assertions.assertEquals("ioovzidsxwaab", model.iconUrl());
        Assertions.assertEquals("ifrygzn", model.displayName());
        Assertions.assertEquals("axri", model.description());
        Assertions.assertEquals("zob", model.termsOfUseUrl());
        Assertions.assertEquals("pxl", model.releaseTag());
        Assertions.assertEquals(ApiTier.STANDARD, model.tier());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApiResourceGeneralInformation model =
            new ApiResourceGeneralInformation()
                .withIconUrl("ioovzidsxwaab")
                .withDisplayName("ifrygzn")
                .withDescription("axri")
                .withTermsOfUseUrl("zob")
                .withReleaseTag("pxl")
                .withTier(ApiTier.STANDARD);
        model = BinaryData.fromObject(model).toObject(ApiResourceGeneralInformation.class);
        Assertions.assertEquals("ioovzidsxwaab", model.iconUrl());
        Assertions.assertEquals("ifrygzn", model.displayName());
        Assertions.assertEquals("axri", model.description());
        Assertions.assertEquals("zob", model.termsOfUseUrl());
        Assertions.assertEquals("pxl", model.releaseTag());
        Assertions.assertEquals(ApiTier.STANDARD, model.tier());
    }
}
