// 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.models.GcpOrganizationalDataOrganization;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class GcpOrganizationalDataOrganizationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        GcpOrganizationalDataOrganization model =
            BinaryData
                .fromString(
                    "{\"organizationMembershipType\":\"Organization\",\"excludedProjectNumbers\":[\"rlefgnaavu\",\"gnteta\",\"utnpdctuhspfefyi\",\"duyeuyl\"],\"serviceAccountEmailAddress\":\"hmtybkcgsuthhll\",\"workloadIdentityProviderId\":\"wynefx\",\"organizationName\":\"lf\"}")
                .toObject(GcpOrganizationalDataOrganization.class);
        Assertions.assertEquals("rlefgnaavu", model.excludedProjectNumbers().get(0));
        Assertions.assertEquals("hmtybkcgsuthhll", model.serviceAccountEmailAddress());
        Assertions.assertEquals("wynefx", model.workloadIdentityProviderId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        GcpOrganizationalDataOrganization model =
            new GcpOrganizationalDataOrganization()
                .withExcludedProjectNumbers(Arrays.asList("rlefgnaavu", "gnteta", "utnpdctuhspfefyi", "duyeuyl"))
                .withServiceAccountEmailAddress("hmtybkcgsuthhll")
                .withWorkloadIdentityProviderId("wynefx");
        model = BinaryData.fromObject(model).toObject(GcpOrganizationalDataOrganization.class);
        Assertions.assertEquals("rlefgnaavu", model.excludedProjectNumbers().get(0));
        Assertions.assertEquals("hmtybkcgsuthhll", model.serviceAccountEmailAddress());
        Assertions.assertEquals("wynefx", model.workloadIdentityProviderId());
    }
}
