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

package com.azure.resourcemanager.storagecache.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagecache.models.PrimingJob;
import org.junit.jupiter.api.Assertions;

public final class PrimingJobTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrimingJob model =
            BinaryData
                .fromString(
                    "{\"primingJobName\":\"gureodkwobdag\",\"primingManifestUrl\":\"tibqdxbxwakb\",\"primingJobId\":\"qxn\",\"primingJobState\":\"Paused\",\"primingJobStatus\":\"gxhuriplbp\",\"primingJobDetails\":\"xunkbebxmubyynt\",\"primingJobPercentComplete\":46.729428955175365}")
                .toObject(PrimingJob.class);
        Assertions.assertEquals("gureodkwobdag", model.primingJobName());
        Assertions.assertEquals("tibqdxbxwakb", model.primingManifestUrl());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrimingJob model = new PrimingJob().withPrimingJobName("gureodkwobdag").withPrimingManifestUrl("tibqdxbxwakb");
        model = BinaryData.fromObject(model).toObject(PrimingJob.class);
        Assertions.assertEquals("gureodkwobdag", model.primingJobName());
        Assertions.assertEquals("tibqdxbxwakb", model.primingManifestUrl());
    }
}
