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

package com.azure.resourcemanager.education.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.education.fluent.models.Amount;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class AmountTests {
    @Test
    public void testDeserialize() {
        Amount model =
            BinaryData.fromString("{\"currency\":\"jsprozvcpute\",\"value\":20.724361}").toObject(Amount.class);
        Assertions.assertEquals("jsprozvcpute", model.currency());
        Assertions.assertEquals(20.724361F, model.value());
    }

    @Test
    public void testSerialize() {
        Amount model = new Amount().withCurrency("jsprozvcpute").withValue(20.724361F);
        model = BinaryData.fromObject(model).toObject(Amount.class);
        Assertions.assertEquals("jsprozvcpute", model.currency());
        Assertions.assertEquals(20.724361F, model.value());
    }
}
