// 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.DataStoreParameters;
import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
import org.junit.jupiter.api.Assertions;

public final class DataStoreParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DataStoreParameters model =
            BinaryData
                .fromString("{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"ArchiveStore\"}")
                .toObject(DataStoreParameters.class);
        Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStoreType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DataStoreParameters model = new DataStoreParameters().withDataStoreType(DataStoreTypes.ARCHIVE_STORE);
        model = BinaryData.fromObject(model).toObject(DataStoreParameters.class);
        Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStoreType());
    }
}
