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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.models.BackupFileInfo;
import com.azure.resourcemanager.datamigration.models.BackupFileStatus;
import org.junit.jupiter.api.Assertions;

public final class BackupFileInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BackupFileInfo model =
            BinaryData
                .fromString(
                    "{\"fileLocation\":\"dckzywbiexz\",\"familySequenceNumber\":1043765409,\"status\":\"Uploading\"}")
                .toObject(BackupFileInfo.class);
        Assertions.assertEquals("dckzywbiexz", model.fileLocation());
        Assertions.assertEquals(1043765409, model.familySequenceNumber());
        Assertions.assertEquals(BackupFileStatus.UPLOADING, model.status());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        BackupFileInfo model =
            new BackupFileInfo()
                .withFileLocation("dckzywbiexz")
                .withFamilySequenceNumber(1043765409)
                .withStatus(BackupFileStatus.UPLOADING);
        model = BinaryData.fromObject(model).toObject(BackupFileInfo.class);
        Assertions.assertEquals("dckzywbiexz", model.fileLocation());
        Assertions.assertEquals(1043765409, model.familySequenceNumber());
        Assertions.assertEquals(BackupFileStatus.UPLOADING, model.status());
    }
}
