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

package com.azure.resourcemanager.maintenance.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.maintenance.fluent.models.MaintenanceWindow;
import org.junit.jupiter.api.Assertions;

public final class MaintenanceWindowTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MaintenanceWindow model =
            BinaryData
                .fromString(
                    "{\"startDateTime\":\"zrnf\",\"expirationDateTime\":\"xgispemvtzfkufu\",\"duration\":\"jofxqe\",\"timeZone\":\"jaeq\",\"recurEvery\":\"qjbasvms\"}")
                .toObject(MaintenanceWindow.class);
        Assertions.assertEquals("zrnf", model.startDateTime());
        Assertions.assertEquals("xgispemvtzfkufu", model.expirationDateTime());
        Assertions.assertEquals("jofxqe", model.duration());
        Assertions.assertEquals("jaeq", model.timeZone());
        Assertions.assertEquals("qjbasvms", model.recurEvery());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MaintenanceWindow model =
            new MaintenanceWindow()
                .withStartDateTime("zrnf")
                .withExpirationDateTime("xgispemvtzfkufu")
                .withDuration("jofxqe")
                .withTimeZone("jaeq")
                .withRecurEvery("qjbasvms");
        model = BinaryData.fromObject(model).toObject(MaintenanceWindow.class);
        Assertions.assertEquals("zrnf", model.startDateTime());
        Assertions.assertEquals("xgispemvtzfkufu", model.expirationDateTime());
        Assertions.assertEquals("jofxqe", model.duration());
        Assertions.assertEquals("jaeq", model.timeZone());
        Assertions.assertEquals("qjbasvms", model.recurEvery());
    }
}
