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

package com.azure.resourcemanager.hybridcompute.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpdateProperties;
import org.junit.jupiter.api.Assertions;

public final class MachineExtensionUpdatePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MachineExtensionUpdateProperties model =
            BinaryData
                .fromString(
                    "{\"forceUpdateTag\":\"gphuticndvka\",\"publisher\":\"wyiftyhxhur\",\"type\":\"ftyxolniw\",\"typeHandlerVersion\":\"cukjf\",\"autoUpgradeMinorVersion\":false,\"settings\":\"dataw\",\"protectedSettings\":\"datalryplwckbasyy\"}")
                .toObject(MachineExtensionUpdateProperties.class);
        Assertions.assertEquals("gphuticndvka", model.forceUpdateTag());
        Assertions.assertEquals("wyiftyhxhur", model.publisher());
        Assertions.assertEquals("ftyxolniw", model.type());
        Assertions.assertEquals("cukjf", model.typeHandlerVersion());
        Assertions.assertEquals(false, model.autoUpgradeMinorVersion());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MachineExtensionUpdateProperties model =
            new MachineExtensionUpdateProperties()
                .withForceUpdateTag("gphuticndvka")
                .withPublisher("wyiftyhxhur")
                .withType("ftyxolniw")
                .withTypeHandlerVersion("cukjf")
                .withAutoUpgradeMinorVersion(false)
                .withSettings("dataw")
                .withProtectedSettings("datalryplwckbasyy");
        model = BinaryData.fromObject(model).toObject(MachineExtensionUpdateProperties.class);
        Assertions.assertEquals("gphuticndvka", model.forceUpdateTag());
        Assertions.assertEquals("wyiftyhxhur", model.publisher());
        Assertions.assertEquals("ftyxolniw", model.type());
        Assertions.assertEquals("cukjf", model.typeHandlerVersion());
        Assertions.assertEquals(false, model.autoUpgradeMinorVersion());
    }
}
