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

public final class MonthlyScheduleTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MonthlySchedule model =
            BinaryData
                .fromString(
                    "{\"snapshotsToKeep\":1628886770,\"daysOfMonth\":\"lcxog\",\"hour\":97204853,\"minute\":244687825,\"usedBytes\":93220061334436953}")
                .toObject(MonthlySchedule.class);
        Assertions.assertEquals(1628886770, model.snapshotsToKeep());
        Assertions.assertEquals("lcxog", model.daysOfMonth());
        Assertions.assertEquals(97204853, model.hour());
        Assertions.assertEquals(244687825, model.minute());
        Assertions.assertEquals(93220061334436953L, model.usedBytes());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MonthlySchedule model =
            new MonthlySchedule()
                .withSnapshotsToKeep(1628886770)
                .withDaysOfMonth("lcxog")
                .withHour(97204853)
                .withMinute(244687825)
                .withUsedBytes(93220061334436953L);
        model = BinaryData.fromObject(model).toObject(MonthlySchedule.class);
        Assertions.assertEquals(1628886770, model.snapshotsToKeep());
        Assertions.assertEquals("lcxog", model.daysOfMonth());
        Assertions.assertEquals(97204853, model.hour());
        Assertions.assertEquals(244687825, model.minute());
        Assertions.assertEquals(93220061334436953L, model.usedBytes());
    }
}
