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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase;
import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
import org.junit.jupiter.api.Assertions;

public final class DataStoreInfoBaseTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DataStoreInfoBase model =
            BinaryData
                .fromString("{\"dataStoreType\":\"VaultStore\",\"objectType\":\"xicslfao\"}")
                .toObject(DataStoreInfoBase.class);
        Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType());
        Assertions.assertEquals("xicslfao", model.objectType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DataStoreInfoBase model =
            new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("xicslfao");
        model = BinaryData.fromObject(model).toObject(DataStoreInfoBase.class);
        Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType());
        Assertions.assertEquals("xicslfao", model.objectType());
    }
}
