// 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.QueryTextInner;
import org.junit.jupiter.api.Assertions;

public final class QueryTextInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        QueryTextInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"queryId\":\"vwhheunmmqhgyx\",\"queryText\":\"onocukok\"},\"id\":\"yaxuconuqszfkb\",\"name\":\"ypewrmjmwvvjekt\",\"type\":\"xsenhwlr\"}")
                .toObject(QueryTextInner.class);
        Assertions.assertEquals("vwhheunmmqhgyx", model.queryId());
        Assertions.assertEquals("onocukok", model.queryText());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        QueryTextInner model = new QueryTextInner().withQueryId("vwhheunmmqhgyx").withQueryText("onocukok");
        model = BinaryData.fromObject(model).toObject(QueryTextInner.class);
        Assertions.assertEquals("vwhheunmmqhgyx", model.queryId());
        Assertions.assertEquals("onocukok", model.queryText());
    }
}
