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

package com.azure.resourcemanager.peering.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.peering.models.PeeringBandwidthOffer;
import org.junit.jupiter.api.Assertions;

public final class PeeringBandwidthOfferTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PeeringBandwidthOffer model =
            BinaryData
                .fromString("{\"offerName\":\"erfuwuttt\",\"valueInMbps\":2038091366}")
                .toObject(PeeringBandwidthOffer.class);
        Assertions.assertEquals("erfuwuttt", model.offerName());
        Assertions.assertEquals(2038091366, model.valueInMbps());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PeeringBandwidthOffer model =
            new PeeringBandwidthOffer().withOfferName("erfuwuttt").withValueInMbps(2038091366);
        model = BinaryData.fromObject(model).toObject(PeeringBandwidthOffer.class);
        Assertions.assertEquals("erfuwuttt", model.offerName());
        Assertions.assertEquals(2038091366, model.valueInMbps());
    }
}
