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

package com.azure.resourcemanager.containerservicefleet.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetProperties;
import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile;
import org.junit.jupiter.api.Assertions;

public final class FleetPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FleetProperties model =
            BinaryData
                .fromString(
                    "{\"provisioningState\":\"Creating\",\"hubProfile\":{\"dnsPrefix\":\"dpvwryoqpsoaccta\",\"fqdn\":\"kljla\",\"kubernetesVersion\":\"cr\"}}")
                .toObject(FleetProperties.class);
        Assertions.assertEquals("dpvwryoqpsoaccta", model.hubProfile().dnsPrefix());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FleetProperties model =
            new FleetProperties().withHubProfile(new FleetHubProfile().withDnsPrefix("dpvwryoqpsoaccta"));
        model = BinaryData.fromObject(model).toObject(FleetProperties.class);
        Assertions.assertEquals("dpvwryoqpsoaccta", model.hubProfile().dnsPrefix());
    }
}
