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

public final class LabResourceCostPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LabResourceCostProperties model =
            BinaryData
                .fromString(
                    "{\"resourcename\":\"fbtkuwhhmhyk\",\"resourceUId\":\"oxafn\",\"resourceCost\":33.922633140455495,\"resourceType\":\"chkoymkcdyh\",\"resourceOwner\":\"kkpwdreqnovvq\",\"resourcePricingTier\":\"vljxywsu\",\"resourceStatus\":\"yrs\",\"resourceId\":\"sytgadgvraea\",\"externalResourceId\":\"e\"}")
                .toObject(LabResourceCostProperties.class);
        Assertions.assertEquals("fbtkuwhhmhyk", model.resourcename());
        Assertions.assertEquals("oxafn", model.resourceUId());
        Assertions.assertEquals(33.922633140455495D, model.resourceCost());
        Assertions.assertEquals("chkoymkcdyh", model.resourceType());
        Assertions.assertEquals("kkpwdreqnovvq", model.resourceOwner());
        Assertions.assertEquals("vljxywsu", model.resourcePricingTier());
        Assertions.assertEquals("yrs", model.resourceStatus());
        Assertions.assertEquals("sytgadgvraea", model.resourceId());
        Assertions.assertEquals("e", model.externalResourceId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LabResourceCostProperties model =
            new LabResourceCostProperties()
                .withResourcename("fbtkuwhhmhyk")
                .withResourceUId("oxafn")
                .withResourceCost(33.922633140455495D)
                .withResourceType("chkoymkcdyh")
                .withResourceOwner("kkpwdreqnovvq")
                .withResourcePricingTier("vljxywsu")
                .withResourceStatus("yrs")
                .withResourceId("sytgadgvraea")
                .withExternalResourceId("e");
        model = BinaryData.fromObject(model).toObject(LabResourceCostProperties.class);
        Assertions.assertEquals("fbtkuwhhmhyk", model.resourcename());
        Assertions.assertEquals("oxafn", model.resourceUId());
        Assertions.assertEquals(33.922633140455495D, model.resourceCost());
        Assertions.assertEquals("chkoymkcdyh", model.resourceType());
        Assertions.assertEquals("kkpwdreqnovvq", model.resourceOwner());
        Assertions.assertEquals("vljxywsu", model.resourcePricingTier());
        Assertions.assertEquals("yrs", model.resourceStatus());
        Assertions.assertEquals("sytgadgvraea", model.resourceId());
        Assertions.assertEquals("e", model.externalResourceId());
    }
}
