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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAutoUpdate;
import com.azure.resourcemanager.synapse.models.UpdateIntegrationRuntimeRequest;
import org.junit.jupiter.api.Assertions;

public final class UpdateIntegrationRuntimeRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UpdateIntegrationRuntimeRequest model =
            BinaryData
                .fromString("{\"autoUpdate\":\"Off\",\"updateDelayOffset\":\"bxqmu\"}")
                .toObject(UpdateIntegrationRuntimeRequest.class);
        Assertions.assertEquals(IntegrationRuntimeAutoUpdate.OFF, model.autoUpdate());
        Assertions.assertEquals("bxqmu", model.updateDelayOffset());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UpdateIntegrationRuntimeRequest model =
            new UpdateIntegrationRuntimeRequest()
                .withAutoUpdate(IntegrationRuntimeAutoUpdate.OFF)
                .withUpdateDelayOffset("bxqmu");
        model = BinaryData.fromObject(model).toObject(UpdateIntegrationRuntimeRequest.class);
        Assertions.assertEquals(IntegrationRuntimeAutoUpdate.OFF, model.autoUpdate());
        Assertions.assertEquals("bxqmu", model.updateDelayOffset());
    }
}
