Unit Testing with Asset Bundles

Hello Everyone,
I have some code for managing Asset Bundles in my game. I’m looking to try and build unit tests. I’m stuck with trying to figure out how to Mock the asset bundle object. It would be so much easier if I could just build an Asset Bundle object for the test. Is this something I should just bite the built and let it load an asset from file?

This is my Test file. The following stuff works and passes the issue I have with this type of test I’m loading a built AssetBundle from the file system. My understanding of unit testing this way is bad.

using System.Collections;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
using NSubstitute;

namespace Tests
{
    public class AssetBundleLoaderTests
    {
        private AssetBundle testAsset;

        [OneTimeSetUp]
        public void LoadAssetBundle()
        {
            //I know this is awful I just didn't have a better way..
            testAsset = AssetBundle.LoadFromFile("ACTUAL FILE PATH");
        }

        [OneTimeTearDown]
        public void UnloadAssetBundle()
        {
            testAsset.Unload(true);
        }

       [UnityTest]
        public IEnumerator AssetBundleLoaderHasFile()
        {
            //Arrange
            int callBackCount = 0;
            var SUT = new AssetBundleLoader();
            var iAssetBundle = Substitute.For<IAssetBundle>();
            var iFileSystem = Substitute.For<IFileSystem>();
            iFileSystem.Exists("yar").Returns(true);
            iAssetBundle.LoadFromFile("yar").Returns(testAsset);
            SUT.assetData = iAssetBundle;
            SUT.fileSystem = iFileSystem;
            
            //Act
            Assert.IsNull(SUT.assetData.GetAsset());
            yield return GlobalCoroutine.Instance.StartCoroutine(SUT.LoadAssetBundle("yar", "", delegate {
                iAssetBundle.GetAsset().Returns(testAsset);
                callBackCount++;
            }));

            //Assert
            iFileSystem.Received().Exists("yar");
            Assert.AreEqual(callBackCount, 1);
            Assert.IsNotNull(SUT.assetData.GetAsset());

            yield return null;
        }
}

This is my Code

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.Networking;

public class AssetBundleLoader
{
    public IAssetBundle assetData = new AssetBundleWrapper();
    public IFileSystem fileSystem = new FileSystem();

    public GenericCallBack3<float> downloadingProgress;
    public GenericCallback2 downloadError;

    public IEnumerator LoadAssetBundle(string filePath, string url, GenericCallBack3<IAssetBundle> assetBundleLoaded)
    {
        if (assetData.GetAsset() != null)
        {
            assetBundleLoaded.Invoke(assetData);
            yield break;
        }
        
        yield return GlobalCoroutine.Instance.StartCoroutine(LoadFromFile(filePath, assetBundleLoaded));
    }

    public IEnumerator LoadFromFile(string filePath, GenericCallBack3<IAssetBundle> assetBundleLoaded) {
        if (fileSystem.Exists(filePath))
        {
            assetData.LoadFromFile(filePath);
            assetBundleLoaded.Invoke(assetData);
            yield break;
        }
    }
}

My Wrapper

using UnityEngine;

public interface IAssetBundle
{
    void SetAsset(AssetBundle assetBundle);
    AssetBundle GetAsset();
    AssetBundle LoadFromFile(string path);
}

public class AssetBundleWrapper : IAssetBundle
{
    private AssetBundle data;

    public AssetBundle GetAsset()
    {
        return data;
    }

    public void SetAsset(AssetBundle assetBundle)
    {
        data = assetBundle;
    }

    public AssetBundle LoadFromFile(string path)
    {
        data = AssetBundle.LoadFromFile(path);
        return GetAsset();
    }
}