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

package com.azure.resourcemanager.security.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.security.fluent.models.SecuritySolutionsReferenceDataProperties;
import com.azure.resourcemanager.security.models.SecurityFamily;
import org.junit.jupiter.api.Assertions;

public final class SecuritySolutionsReferenceDataPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SecuritySolutionsReferenceDataProperties model =
            BinaryData
                .fromString(
                    "{\"securityFamily\":\"Ngfw\",\"alertVendorName\":\"ixtmkzjvkviirhgf\",\"packageInfoUrl\":\"rwsdp\",\"productName\":\"ra\",\"publisher\":\"zvzbglbyv\",\"publisherDisplayName\":\"ctctbrxkjz\",\"template\":\"rgxffmshkw\"}")
                .toObject(SecuritySolutionsReferenceDataProperties.class);
        Assertions.assertEquals(SecurityFamily.NGFW, model.securityFamily());
        Assertions.assertEquals("ixtmkzjvkviirhgf", model.alertVendorName());
        Assertions.assertEquals("rwsdp", model.packageInfoUrl());
        Assertions.assertEquals("ra", model.productName());
        Assertions.assertEquals("zvzbglbyv", model.publisher());
        Assertions.assertEquals("ctctbrxkjz", model.publisherDisplayName());
        Assertions.assertEquals("rgxffmshkw", model.template());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SecuritySolutionsReferenceDataProperties model =
            new SecuritySolutionsReferenceDataProperties()
                .withSecurityFamily(SecurityFamily.NGFW)
                .withAlertVendorName("ixtmkzjvkviirhgf")
                .withPackageInfoUrl("rwsdp")
                .withProductName("ra")
                .withPublisher("zvzbglbyv")
                .withPublisherDisplayName("ctctbrxkjz")
                .withTemplate("rgxffmshkw");
        model = BinaryData.fromObject(model).toObject(SecuritySolutionsReferenceDataProperties.class);
        Assertions.assertEquals(SecurityFamily.NGFW, model.securityFamily());
        Assertions.assertEquals("ixtmkzjvkviirhgf", model.alertVendorName());
        Assertions.assertEquals("rwsdp", model.packageInfoUrl());
        Assertions.assertEquals("ra", model.productName());
        Assertions.assertEquals("zvzbglbyv", model.publisher());
        Assertions.assertEquals("ctctbrxkjz", model.publisherDisplayName());
        Assertions.assertEquals("rgxffmshkw", model.template());
    }
}
