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

package com.azure.resourcemanager.maintenance.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.maintenance.fluent.models.ConfigurationAssignmentInner;
import org.junit.jupiter.api.Assertions;

public final class ConfigurationAssignmentInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ConfigurationAssignmentInner model =
            BinaryData
                .fromString(
                    "{\"location\":\"bvmgxsabkyqduuji\",\"properties\":{\"maintenanceConfigurationId\":\"czdzev\",\"resourceId\":\"hkr\"},\"id\":\"d\",\"name\":\"ppdsbdkvwrwj\",\"type\":\"eusnhutj\"}")
                .toObject(ConfigurationAssignmentInner.class);
        Assertions.assertEquals("bvmgxsabkyqduuji", model.location());
        Assertions.assertEquals("czdzev", model.maintenanceConfigurationId());
        Assertions.assertEquals("hkr", model.resourceId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ConfigurationAssignmentInner model =
            new ConfigurationAssignmentInner()
                .withLocation("bvmgxsabkyqduuji")
                .withMaintenanceConfigurationId("czdzev")
                .withResourceId("hkr");
        model = BinaryData.fromObject(model).toObject(ConfigurationAssignmentInner.class);
        Assertions.assertEquals("bvmgxsabkyqduuji", model.location());
        Assertions.assertEquals("czdzev", model.maintenanceConfigurationId());
        Assertions.assertEquals("hkr", model.resourceId());
    }
}
