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

package com.azure.resourcemanager.deploymentmanager.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.deploymentmanager.models.ServiceUnitArtifacts;
import org.junit.jupiter.api.Assertions;

public final class ServiceUnitArtifactsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ServiceUnitArtifacts model =
            BinaryData
                .fromString(
                    "{\"templateUri\":\"pmqnja\",\"parametersUri\":\"ixjsprozvcputeg\",\"templateArtifactSourceRelativePath\":\"wmfdatscmdvpjhul\",\"parametersArtifactSourceRelativePath\":\"uvm\"}")
                .toObject(ServiceUnitArtifacts.class);
        Assertions.assertEquals("pmqnja", model.templateUri());
        Assertions.assertEquals("ixjsprozvcputeg", model.parametersUri());
        Assertions.assertEquals("wmfdatscmdvpjhul", model.templateArtifactSourceRelativePath());
        Assertions.assertEquals("uvm", model.parametersArtifactSourceRelativePath());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ServiceUnitArtifacts model =
            new ServiceUnitArtifacts()
                .withTemplateUri("pmqnja")
                .withParametersUri("ixjsprozvcputeg")
                .withTemplateArtifactSourceRelativePath("wmfdatscmdvpjhul")
                .withParametersArtifactSourceRelativePath("uvm");
        model = BinaryData.fromObject(model).toObject(ServiceUnitArtifacts.class);
        Assertions.assertEquals("pmqnja", model.templateUri());
        Assertions.assertEquals("ixjsprozvcputeg", model.parametersUri());
        Assertions.assertEquals("wmfdatscmdvpjhul", model.templateArtifactSourceRelativePath());
        Assertions.assertEquals("uvm", model.parametersArtifactSourceRelativePath());
    }
}
