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

package com.azure.resourcemanager.managednetworkfabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner;
import com.azure.resourcemanager.managednetworkfabric.models.OperationalStatus;
import com.azure.resourcemanager.managednetworkfabric.models.PowerCycleState;
import org.junit.jupiter.api.Assertions;

public final class GetDeviceStatusPropertiesInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        GetDeviceStatusPropertiesInner model =
            BinaryData
                .fromString("{\"operationalStatus\":\"Booted\",\"powerCycleState\":\"On\",\"serialNumber\":\"pevf\"}")
                .toObject(GetDeviceStatusPropertiesInner.class);
        Assertions.assertEquals(OperationalStatus.BOOTED, model.operationalStatus());
        Assertions.assertEquals(PowerCycleState.ON, model.powerCycleState());
        Assertions.assertEquals("pevf", model.serialNumber());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        GetDeviceStatusPropertiesInner model =
            new GetDeviceStatusPropertiesInner()
                .withOperationalStatus(OperationalStatus.BOOTED)
                .withPowerCycleState(PowerCycleState.ON)
                .withSerialNumber("pevf");
        model = BinaryData.fromObject(model).toObject(GetDeviceStatusPropertiesInner.class);
        Assertions.assertEquals(OperationalStatus.BOOTED, model.operationalStatus());
        Assertions.assertEquals(PowerCycleState.ON, model.powerCycleState());
        Assertions.assertEquals("pevf", model.serialNumber());
    }
}
