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

package com.azure.resourcemanager.mediaservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mediaservices.models.Rectangle;
import org.junit.jupiter.api.Assertions;

public final class RectangleTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Rectangle model =
            BinaryData
                .fromString(
                    "{\"left\":\"pjxxkzb\",\"top\":\"sgeivsiy\",\"width\":\"kdncj\",\"height\":\"onbzoggculapzwy\"}")
                .toObject(Rectangle.class);
        Assertions.assertEquals("pjxxkzb", model.left());
        Assertions.assertEquals("sgeivsiy", model.top());
        Assertions.assertEquals("kdncj", model.width());
        Assertions.assertEquals("onbzoggculapzwy", model.height());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Rectangle model =
            new Rectangle().withLeft("pjxxkzb").withTop("sgeivsiy").withWidth("kdncj").withHeight("onbzoggculapzwy");
        model = BinaryData.fromObject(model).toObject(Rectangle.class);
        Assertions.assertEquals("pjxxkzb", model.left());
        Assertions.assertEquals("sgeivsiy", model.top());
        Assertions.assertEquals("kdncj", model.width());
        Assertions.assertEquals("onbzoggculapzwy", model.height());
    }
}
