// 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.fluent.models.IntegrationAccountSchemaProperties;
import com.azure.resourcemanager.logic.models.SchemaType;
import org.junit.jupiter.api.Assertions;

public final class IntegrationAccountSchemaPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IntegrationAccountSchemaProperties model =
            BinaryData
                .fromString(
                    "{\"schemaType\":\"Xml\",\"targetNamespace\":\"j\",\"documentName\":\"nlfzxiavrmbz\",\"fileName\":\"okixrjqcir\",\"createdTime\":\"2021-02-12T14:44:45Z\",\"changedTime\":\"2021-01-31T15:02:11Z\",\"metadata\":\"dataazszrnwoiindfpw\",\"content\":\"ylwbtlhflsjcdhsz\",\"contentType\":\"vfbgofeljagrqmqh\",\"contentLink\":{\"uri\":\"riiiojnalghfkv\",\"contentVersion\":\"sexso\",\"contentSize\":1864806181782385356,\"contentHash\":{\"algorithm\":\"hhahhxvrhmzkwpjg\",\"value\":\"spughftqsxhq\"},\"metadata\":\"dataj\"}}")
                .toObject(IntegrationAccountSchemaProperties.class);
        Assertions.assertEquals(SchemaType.XML, model.schemaType());
        Assertions.assertEquals("j", model.targetNamespace());
        Assertions.assertEquals("nlfzxiavrmbz", model.documentName());
        Assertions.assertEquals("okixrjqcir", model.fileName());
        Assertions.assertEquals("ylwbtlhflsjcdhsz", model.content());
        Assertions.assertEquals("vfbgofeljagrqmqh", model.contentType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IntegrationAccountSchemaProperties model =
            new IntegrationAccountSchemaProperties()
                .withSchemaType(SchemaType.XML)
                .withTargetNamespace("j")
                .withDocumentName("nlfzxiavrmbz")
                .withFileName("okixrjqcir")
                .withMetadata("dataazszrnwoiindfpw")
                .withContent("ylwbtlhflsjcdhsz")
                .withContentType("vfbgofeljagrqmqh");
        model = BinaryData.fromObject(model).toObject(IntegrationAccountSchemaProperties.class);
        Assertions.assertEquals(SchemaType.XML, model.schemaType());
        Assertions.assertEquals("j", model.targetNamespace());
        Assertions.assertEquals("nlfzxiavrmbz", model.documentName());
        Assertions.assertEquals("okixrjqcir", model.fileName());
        Assertions.assertEquals("ylwbtlhflsjcdhsz", model.content());
        Assertions.assertEquals("vfbgofeljagrqmqh", model.contentType());
    }
}
