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

package com.azure.resourcemanager.resourcemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.resourcemover.models.AvailabilitySetResourceSettings;
import org.junit.jupiter.api.Assertions;

public final class AvailabilitySetResourceSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AvailabilitySetResourceSettings model =
            BinaryData
                .fromString(
                    "{\"resourceType\":\"Microsoft.Compute/availabilitySets\",\"faultDomain\":1146785059,\"updateDomain\":983901153,\"targetResourceName\":\"faxkffeii\"}")
                .toObject(AvailabilitySetResourceSettings.class);
        Assertions.assertEquals("faxkffeii", model.targetResourceName());
        Assertions.assertEquals(1146785059, model.faultDomain());
        Assertions.assertEquals(983901153, model.updateDomain());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AvailabilitySetResourceSettings model =
            new AvailabilitySetResourceSettings()
                .withTargetResourceName("faxkffeii")
                .withFaultDomain(1146785059)
                .withUpdateDomain(983901153);
        model = BinaryData.fromObject(model).toObject(AvailabilitySetResourceSettings.class);
        Assertions.assertEquals("faxkffeii", model.targetResourceName());
        Assertions.assertEquals(1146785059, model.faultDomain());
        Assertions.assertEquals(983901153, model.updateDomain());
    }
}
