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

package com.azure.resourcemanager.reservations.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.reservations.models.ChangeDirectoryResult;
import org.junit.jupiter.api.Assertions;

public final class ChangeDirectoryResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ChangeDirectoryResult model =
            BinaryData
                .fromString("{\"id\":\"e\",\"name\":\"zar\",\"isSucceeded\":true,\"error\":\"uu\"}")
                .toObject(ChangeDirectoryResult.class);
        Assertions.assertEquals("e", model.id());
        Assertions.assertEquals("zar", model.name());
        Assertions.assertEquals(true, model.isSucceeded());
        Assertions.assertEquals("uu", model.error());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ChangeDirectoryResult model =
            new ChangeDirectoryResult().withId("e").withName("zar").withIsSucceeded(true).withError("uu");
        model = BinaryData.fromObject(model).toObject(ChangeDirectoryResult.class);
        Assertions.assertEquals("e", model.id());
        Assertions.assertEquals("zar", model.name());
        Assertions.assertEquals(true, model.isSucceeded());
        Assertions.assertEquals("uu", model.error());
    }
}
