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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.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\":1000390440,\"isLast\":false}").toObject(Day.class);
        Assertions.assertEquals(1000390440, model.date());
        Assertions.assertEquals(false, model.isLast());
    }

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