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

package com.azure.resourcemanager.imagebuilder.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateFileCustomizer;
import org.junit.jupiter.api.Assertions;

public final class ImageTemplateFileCustomizerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ImageTemplateFileCustomizer model =
            BinaryData
                .fromString(
                    "{\"type\":\"File\",\"sourceUri\":\"qn\",\"sha256Checksum\":\"oczvy\",\"destination\":\"qrvkdv\",\"name\":\"llr\"}")
                .toObject(ImageTemplateFileCustomizer.class);
        Assertions.assertEquals("llr", model.name());
        Assertions.assertEquals("qn", model.sourceUri());
        Assertions.assertEquals("oczvy", model.sha256Checksum());
        Assertions.assertEquals("qrvkdv", model.destination());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ImageTemplateFileCustomizer model =
            new ImageTemplateFileCustomizer()
                .withName("llr")
                .withSourceUri("qn")
                .withSha256Checksum("oczvy")
                .withDestination("qrvkdv");
        model = BinaryData.fromObject(model).toObject(ImageTemplateFileCustomizer.class);
        Assertions.assertEquals("llr", model.name());
        Assertions.assertEquals("qn", model.sourceUri());
        Assertions.assertEquals("oczvy", model.sha256Checksum());
        Assertions.assertEquals("qrvkdv", model.destination());
    }
}
