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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.WorkflowTriggerReference;
import org.junit.jupiter.api.Assertions;

public final class WorkflowTriggerReferenceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkflowTriggerReference model =
            BinaryData
                .fromString(
                    "{\"flowName\":\"bavxbniwdjswzt\",\"triggerName\":\"bpg\",\"id\":\"ytxhp\",\"name\":\"bzpfzab\",\"type\":\"cuh\"}")
                .toObject(WorkflowTriggerReference.class);
        Assertions.assertEquals("ytxhp", model.id());
        Assertions.assertEquals("bavxbniwdjswzt", model.flowName());
        Assertions.assertEquals("bpg", model.triggerName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkflowTriggerReference model =
            new WorkflowTriggerReference().withId("ytxhp").withFlowName("bavxbniwdjswzt").withTriggerName("bpg");
        model = BinaryData.fromObject(model).toObject(WorkflowTriggerReference.class);
        Assertions.assertEquals("ytxhp", model.id());
        Assertions.assertEquals("bavxbniwdjswzt", model.flowName());
        Assertions.assertEquals("bpg", model.triggerName());
    }
}
