// 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.ComputeInstanceEnvironmentInfo;
import org.junit.jupiter.api.Assertions;

public final class ComputeInstanceEnvironmentInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ComputeInstanceEnvironmentInfo model =
            BinaryData
                .fromString("{\"name\":\"incqlhriswsl\",\"version\":\"iiovgqcgxu\"}")
                .toObject(ComputeInstanceEnvironmentInfo.class);
        Assertions.assertEquals("incqlhriswsl", model.name());
        Assertions.assertEquals("iiovgqcgxu", model.version());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ComputeInstanceEnvironmentInfo model =
            new ComputeInstanceEnvironmentInfo().withName("incqlhriswsl").withVersion("iiovgqcgxu");
        model = BinaryData.fromObject(model).toObject(ComputeInstanceEnvironmentInfo.class);
        Assertions.assertEquals("incqlhriswsl", model.name());
        Assertions.assertEquals("iiovgqcgxu", model.version());
    }
}
