public void LoaderUsesFileLoaderFirst(FileOrResourceScriptLoader sut, string scriptName, string scriptSource)
        {
            Mock.Get(sut.FileLoader).Setup(x => x.Load(scriptName)).Returns(scriptSource);

            var actual = sut.Load(scriptName);
            Assert.Equal(scriptSource, actual);
        }
        public void LoaderUsesResourceLoaderWhenFileLoaderCannotLoad(FileOrResourceScriptLoader sut, string scriptName, string scriptSource)
        {
            Mock.Get(sut.FileLoader).Setup(x => x.Load(scriptName)).Throws(new ScriptLoadException(""));
            Mock.Get(sut.ResourceLoader).Setup(x => x.Load(scriptName)).Returns(scriptSource);

            var actual = sut.Load(scriptName);
            Assert.Equal(scriptSource, actual);
        }
        public void LoaderThrowsExceptionWhenScriptCannotBeLoaded(FileOrResourceScriptLoader sut, string scriptName, string scriptSource)
        {
            var expected = new ScriptLoadException("");
            Mock.Get(sut.FileLoader).Setup(x => x.Load(scriptName)).Throws(expected);
            Mock.Get(sut.ResourceLoader).Setup(x => x.Load(scriptName)).Returns(value: null);

            var actual = Assert.Throws<ScriptLoadException>(() => sut.Load(scriptName));
           
            Assert.Same(expected, actual);
        }