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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory;
import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType;
import org.junit.jupiter.api.Assertions;

public final class SqlDataDirectoryTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SqlDataDirectory model =
            BinaryData
                .fromString("{\"type\":\"Log\",\"path\":\"hsgz\",\"logicalName\":\"zbgomfgbeg\"}")
                .toObject(SqlDataDirectory.class);
        Assertions.assertEquals(SqlDataDirectoryType.LOG, model.type());
        Assertions.assertEquals("hsgz", model.path());
        Assertions.assertEquals("zbgomfgbeg", model.logicalName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SqlDataDirectory model =
            new SqlDataDirectory().withType(SqlDataDirectoryType.LOG).withPath("hsgz").withLogicalName("zbgomfgbeg");
        model = BinaryData.fromObject(model).toObject(SqlDataDirectory.class);
        Assertions.assertEquals(SqlDataDirectoryType.LOG, model.type());
        Assertions.assertEquals("hsgz", model.path());
        Assertions.assertEquals("zbgomfgbeg", model.logicalName());
    }
}
