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

public final class DailyScheduleTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DailySchedule model =
            BinaryData
                .fromString(
                    "{\"snapshotsToKeep\":199039203,\"hour\":20287236,\"minute\":1409341290,\"usedBytes\":6033840789921327792}")
                .toObject(DailySchedule.class);
        Assertions.assertEquals(199039203, model.snapshotsToKeep());
        Assertions.assertEquals(20287236, model.hour());
        Assertions.assertEquals(1409341290, model.minute());
        Assertions.assertEquals(6033840789921327792L, model.usedBytes());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DailySchedule model =
            new DailySchedule()
                .withSnapshotsToKeep(199039203)
                .withHour(20287236)
                .withMinute(1409341290)
                .withUsedBytes(6033840789921327792L);
        model = BinaryData.fromObject(model).toObject(DailySchedule.class);
        Assertions.assertEquals(199039203, model.snapshotsToKeep());
        Assertions.assertEquals(20287236, model.hour());
        Assertions.assertEquals(1409341290, model.minute());
        Assertions.assertEquals(6033840789921327792L, model.usedBytes());
    }
}
