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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.models.MigrationValidationOptions;
import org.junit.jupiter.api.Assertions;

public final class MigrationValidationOptionsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MigrationValidationOptions model =
            BinaryData
                .fromString(
                    "{\"enableSchemaValidation\":false,\"enableDataIntegrityValidation\":true,\"enableQueryAnalysisValidation\":true}")
                .toObject(MigrationValidationOptions.class);
        Assertions.assertEquals(false, model.enableSchemaValidation());
        Assertions.assertEquals(true, model.enableDataIntegrityValidation());
        Assertions.assertEquals(true, model.enableQueryAnalysisValidation());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MigrationValidationOptions model =
            new MigrationValidationOptions()
                .withEnableSchemaValidation(false)
                .withEnableDataIntegrityValidation(true)
                .withEnableQueryAnalysisValidation(true);
        model = BinaryData.fromObject(model).toObject(MigrationValidationOptions.class);
        Assertions.assertEquals(false, model.enableSchemaValidation());
        Assertions.assertEquals(true, model.enableDataIntegrityValidation());
        Assertions.assertEquals(true, model.enableQueryAnalysisValidation());
    }
}
