// 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.CustomImageOsType;
import com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesCustom;
import org.junit.jupiter.api.Assertions;

public final class CustomImagePropertiesCustomTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CustomImagePropertiesCustom model =
            BinaryData
                .fromString("{\"imageName\":\"x\",\"sysPrep\":true,\"osType\":\"None\"}")
                .toObject(CustomImagePropertiesCustom.class);
        Assertions.assertEquals("x", model.imageName());
        Assertions.assertEquals(true, model.sysPrep());
        Assertions.assertEquals(CustomImageOsType.NONE, model.osType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CustomImagePropertiesCustom model =
            new CustomImagePropertiesCustom().withImageName("x").withSysPrep(true).withOsType(CustomImageOsType.NONE);
        model = BinaryData.fromObject(model).toObject(CustomImagePropertiesCustom.class);
        Assertions.assertEquals("x", model.imageName());
        Assertions.assertEquals(true, model.sysPrep());
        Assertions.assertEquals(CustomImageOsType.NONE, model.osType());
    }
}
