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

package com.azure.resourcemanager.datadog.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datadog.models.DatadogInstallMethod;
import org.junit.jupiter.api.Assertions;

public final class DatadogInstallMethodTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DatadogInstallMethod model =
            BinaryData
                .fromString("{\"tool\":\"yhxhu\",\"toolVersion\":\"k\",\"installerVersion\":\"yxolniwp\"}")
                .toObject(DatadogInstallMethod.class);
        Assertions.assertEquals("yhxhu", model.tool());
        Assertions.assertEquals("k", model.toolVersion());
        Assertions.assertEquals("yxolniwp", model.installerVersion());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DatadogInstallMethod model =
            new DatadogInstallMethod().withTool("yhxhu").withToolVersion("k").withInstallerVersion("yxolniwp");
        model = BinaryData.fromObject(model).toObject(DatadogInstallMethod.class);
        Assertions.assertEquals("yhxhu", model.tool());
        Assertions.assertEquals("k", model.toolVersion());
        Assertions.assertEquals("yxolniwp", model.installerVersion());
    }
}
