// 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.MigrateSyncCompleteCommandInput;
import java.time.OffsetDateTime;
import org.junit.jupiter.api.Assertions;

public final class MigrateSyncCompleteCommandInputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MigrateSyncCompleteCommandInput model =
            BinaryData
                .fromString("{\"databaseName\":\"cattpngjcrcczsq\",\"commitTimeStamp\":\"2021-06-22T20:12:51Z\"}")
                .toObject(MigrateSyncCompleteCommandInput.class);
        Assertions.assertEquals("cattpngjcrcczsq", model.databaseName());
        Assertions.assertEquals(OffsetDateTime.parse("2021-06-22T20:12:51Z"), model.commitTimestamp());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MigrateSyncCompleteCommandInput model =
            new MigrateSyncCompleteCommandInput()
                .withDatabaseName("cattpngjcrcczsq")
                .withCommitTimestamp(OffsetDateTime.parse("2021-06-22T20:12:51Z"));
        model = BinaryData.fromObject(model).toObject(MigrateSyncCompleteCommandInput.class);
        Assertions.assertEquals("cattpngjcrcczsq", model.databaseName());
        Assertions.assertEquals(OffsetDateTime.parse("2021-06-22T20:12:51Z"), model.commitTimestamp());
    }
}
