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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.Day;
import org.junit.jupiter.api.Assertions;

public final class DayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Day model = BinaryData.fromString("{\"date\":1914058756,\"isLast\":true}").toObject(Day.class);
        Assertions.assertEquals(1914058756, model.date());
        Assertions.assertEquals(true, model.isLast());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Day model = new Day().withDate(1914058756).withIsLast(true);
        model = BinaryData.fromObject(model).toObject(Day.class);
        Assertions.assertEquals(1914058756, model.date());
        Assertions.assertEquals(true, model.isLast());
    }
}
