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

package com.azure.resourcemanager.mobilenetwork.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mobilenetwork.fluent.models.SlicePropertiesFormat;
import com.azure.resourcemanager.mobilenetwork.models.Snssai;
import org.junit.jupiter.api.Assertions;

public final class SlicePropertiesFormatTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SlicePropertiesFormat model =
            BinaryData
                .fromString(
                    "{\"provisioningState\":\"Accepted\",\"snssai\":{\"sst\":673531978,\"sd\":\"vreljea\"},\"description\":\"rvzmlovuana\"}")
                .toObject(SlicePropertiesFormat.class);
        Assertions.assertEquals(673531978, model.snssai().sst());
        Assertions.assertEquals("vreljea", model.snssai().sd());
        Assertions.assertEquals("rvzmlovuana", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SlicePropertiesFormat model =
            new SlicePropertiesFormat()
                .withSnssai(new Snssai().withSst(673531978).withSd("vreljea"))
                .withDescription("rvzmlovuana");
        model = BinaryData.fromObject(model).toObject(SlicePropertiesFormat.class);
        Assertions.assertEquals(673531978, model.snssai().sst());
        Assertions.assertEquals("vreljea", model.snssai().sd());
        Assertions.assertEquals("rvzmlovuana", model.description());
    }
}
