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

package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.Status;
import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas;
import org.junit.jupiter.api.Assertions;

public final class UpdateWorkspaceQuotasTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UpdateWorkspaceQuotas model =
            BinaryData
                .fromString(
                    "{\"id\":\"sa\",\"type\":\"wkuofoskghsauu\",\"limit\":6549860277400431394,\"unit\":\"Count\",\"status\":\"Failure\"}")
                .toObject(UpdateWorkspaceQuotas.class);
        Assertions.assertEquals(6549860277400431394L, model.limit());
        Assertions.assertEquals(Status.FAILURE, model.status());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UpdateWorkspaceQuotas model =
            new UpdateWorkspaceQuotas().withLimit(6549860277400431394L).withStatus(Status.FAILURE);
        model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotas.class);
        Assertions.assertEquals(6549860277400431394L, model.limit());
        Assertions.assertEquals(Status.FAILURE, model.status());
    }
}
