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

package com.azure.resourcemanager.netapp.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties;
import com.azure.resourcemanager.netapp.models.QosType;
import org.junit.jupiter.api.Assertions;

public final class PoolPatchPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PoolPatchProperties model =
            BinaryData
                .fromString("{\"size\":8915857091335509651,\"qosType\":\"Manual\",\"coolAccess\":true}")
                .toObject(PoolPatchProperties.class);
        Assertions.assertEquals(8915857091335509651L, model.size());
        Assertions.assertEquals(QosType.MANUAL, model.qosType());
        Assertions.assertEquals(true, model.coolAccess());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PoolPatchProperties model =
            new PoolPatchProperties().withSize(8915857091335509651L).withQosType(QosType.MANUAL).withCoolAccess(true);
        model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class);
        Assertions.assertEquals(8915857091335509651L, model.size());
        Assertions.assertEquals(QosType.MANUAL, model.qosType());
        Assertions.assertEquals(true, model.coolAccess());
    }
}
