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

package com.azure.resourcemanager.devtestlabs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.devtestlabs.models.GalleryImageReference;
import org.junit.jupiter.api.Assertions;

public final class GalleryImageReferenceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        GalleryImageReference model =
            BinaryData
                .fromString(
                    "{\"offer\":\"fgbvfvpdbo\",\"publisher\":\"cizsjqlhkrribdei\",\"sku\":\"ipqkghvxndzwm\",\"osType\":\"efajpj\",\"version\":\"wkqnyhg\"}")
                .toObject(GalleryImageReference.class);
        Assertions.assertEquals("fgbvfvpdbo", model.offer());
        Assertions.assertEquals("cizsjqlhkrribdei", model.publisher());
        Assertions.assertEquals("ipqkghvxndzwm", model.sku());
        Assertions.assertEquals("efajpj", model.osType());
        Assertions.assertEquals("wkqnyhg", model.version());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        GalleryImageReference model =
            new GalleryImageReference()
                .withOffer("fgbvfvpdbo")
                .withPublisher("cizsjqlhkrribdei")
                .withSku("ipqkghvxndzwm")
                .withOsType("efajpj")
                .withVersion("wkqnyhg");
        model = BinaryData.fromObject(model).toObject(GalleryImageReference.class);
        Assertions.assertEquals("fgbvfvpdbo", model.offer());
        Assertions.assertEquals("cizsjqlhkrribdei", model.publisher());
        Assertions.assertEquals("ipqkghvxndzwm", model.sku());
        Assertions.assertEquals("efajpj", model.osType());
        Assertions.assertEquals("wkqnyhg", model.version());
    }
}
