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

package com.azure.resourcemanager.mariadb.generated;

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

public final class LogFilePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LogFileProperties model =
            BinaryData
                .fromString(
                    "{\"sizeInKB\":13518559059798851,\"createdTime\":\"2021-10-23T04:38:56Z\",\"lastModifiedTime\":\"2021-02-07T15:05:32Z\",\"type\":\"jixhbk\",\"url\":\"fqweykhmene\"}")
                .toObject(LogFileProperties.class);
        Assertions.assertEquals(13518559059798851L, model.sizeInKB());
        Assertions.assertEquals("jixhbk", model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LogFileProperties model = new LogFileProperties().withSizeInKB(13518559059798851L).withType("jixhbk");
        model = BinaryData.fromObject(model).toObject(LogFileProperties.class);
        Assertions.assertEquals(13518559059798851L, model.sizeInKB());
        Assertions.assertEquals("jixhbk", model.type());
    }
}
