// 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.ContentHash;
import org.junit.jupiter.api.Assertions;

public final class ContentHashTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ContentHash model =
            BinaryData.fromString("{\"algorithm\":\"kn\",\"value\":\"scwsv\"}").toObject(ContentHash.class);
        Assertions.assertEquals("kn", model.algorithm());
        Assertions.assertEquals("scwsv", model.value());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ContentHash model = new ContentHash().withAlgorithm("kn").withValue("scwsv");
        model = BinaryData.fromObject(model).toObject(ContentHash.class);
        Assertions.assertEquals("kn", model.algorithm());
        Assertions.assertEquals("scwsv", model.value());
    }
}
