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

public final class HourlyScheduleTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        HourlySchedule model =
            BinaryData
                .fromString("{\"snapshotsToKeep\":792180038,\"minute\":1458027183,\"usedBytes\":4936822045800298371}")
                .toObject(HourlySchedule.class);
        Assertions.assertEquals(792180038, model.snapshotsToKeep());
        Assertions.assertEquals(1458027183, model.minute());
        Assertions.assertEquals(4936822045800298371L, model.usedBytes());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        HourlySchedule model =
            new HourlySchedule()
                .withSnapshotsToKeep(792180038)
                .withMinute(1458027183)
                .withUsedBytes(4936822045800298371L);
        model = BinaryData.fromObject(model).toObject(HourlySchedule.class);
        Assertions.assertEquals(792180038, model.snapshotsToKeep());
        Assertions.assertEquals(1458027183, model.minute());
        Assertions.assertEquals(4936822045800298371L, model.usedBytes());
    }
}
