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

public final class ImageTemplateFileValidatorTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ImageTemplateFileValidator model =
            BinaryData
                .fromString(
                    "{\"type\":\"File\",\"sourceUri\":\"lhslazjdyggdtj\",\"sha256Checksum\":\"hbkuofqwey\",\"destination\":\"menevfyexfwh\",\"name\":\"cibvyvdcsitynn\"}")
                .toObject(ImageTemplateFileValidator.class);
        Assertions.assertEquals("cibvyvdcsitynn", model.name());
        Assertions.assertEquals("lhslazjdyggdtj", model.sourceUri());
        Assertions.assertEquals("hbkuofqwey", model.sha256Checksum());
        Assertions.assertEquals("menevfyexfwh", model.destination());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ImageTemplateFileValidator model =
            new ImageTemplateFileValidator()
                .withName("cibvyvdcsitynn")
                .withSourceUri("lhslazjdyggdtj")
                .withSha256Checksum("hbkuofqwey")
                .withDestination("menevfyexfwh");
        model = BinaryData.fromObject(model).toObject(ImageTemplateFileValidator.class);
        Assertions.assertEquals("cibvyvdcsitynn", model.name());
        Assertions.assertEquals("lhslazjdyggdtj", model.sourceUri());
        Assertions.assertEquals("hbkuofqwey", model.sha256Checksum());
        Assertions.assertEquals("menevfyexfwh", model.destination());
    }
}
