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

package com.azure.resourcemanager.securitydevops.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.securitydevops.models.GitHubOwnerProperties;
import com.azure.resourcemanager.securitydevops.models.ProvisioningState;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class GitHubOwnerPropertiesTests {
    @Test
    public void testDeserialize() {
        GitHubOwnerProperties model =
            BinaryData
                .fromString("{\"provisioningState\":\"Canceled\",\"ownerUrl\":\"ipheoflokeyyien\"}")
                .toObject(GitHubOwnerProperties.class);
        Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState());
        Assertions.assertEquals("ipheoflokeyyien", model.ownerUrl());
    }

    @Test
    public void testSerialize() {
        GitHubOwnerProperties model =
            new GitHubOwnerProperties()
                .withProvisioningState(ProvisioningState.CANCELED)
                .withOwnerUrl("ipheoflokeyyien");
        model = BinaryData.fromObject(model).toObject(GitHubOwnerProperties.class);
        Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState());
        Assertions.assertEquals("ipheoflokeyyien", model.ownerUrl());
    }
}
