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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.X12ProcessingSettings;
import org.junit.jupiter.api.Assertions;

public final class X12ProcessingSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        X12ProcessingSettings model =
            BinaryData
                .fromString(
                    "{\"maskSecurityInfo\":true,\"convertImpliedDecimal\":false,\"preserveInterchange\":false,\"suspendInterchangeOnError\":true,\"createEmptyXmlTagsForTrailingSeparators\":false,\"useDotAsDecimalSeparator\":false}")
                .toObject(X12ProcessingSettings.class);
        Assertions.assertEquals(true, model.maskSecurityInfo());
        Assertions.assertEquals(false, model.convertImpliedDecimal());
        Assertions.assertEquals(false, model.preserveInterchange());
        Assertions.assertEquals(true, model.suspendInterchangeOnError());
        Assertions.assertEquals(false, model.createEmptyXmlTagsForTrailingSeparators());
        Assertions.assertEquals(false, model.useDotAsDecimalSeparator());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        X12ProcessingSettings model =
            new X12ProcessingSettings()
                .withMaskSecurityInfo(true)
                .withConvertImpliedDecimal(false)
                .withPreserveInterchange(false)
                .withSuspendInterchangeOnError(true)
                .withCreateEmptyXmlTagsForTrailingSeparators(false)
                .withUseDotAsDecimalSeparator(false);
        model = BinaryData.fromObject(model).toObject(X12ProcessingSettings.class);
        Assertions.assertEquals(true, model.maskSecurityInfo());
        Assertions.assertEquals(false, model.convertImpliedDecimal());
        Assertions.assertEquals(false, model.preserveInterchange());
        Assertions.assertEquals(true, model.suspendInterchangeOnError());
        Assertions.assertEquals(false, model.createEmptyXmlTagsForTrailingSeparators());
        Assertions.assertEquals(false, model.useDotAsDecimalSeparator());
    }
}
