示例#1
0
        public void LoadPluginFilesTest()
        {
            ILocation loc = null;

            var fileLoaderMock = new Mock <IFileLoader>();

            fileLoaderMock.Setup(m => m.LoadFolder(It.IsAny <ILocation>(), It.IsAny <string[]>()))
            .Returns((ILocation l, string[] f) =>
            {
                loc = l;
                return(AsyncEnumerable.Empty <IFile>());
            });

            var libLoader = new FolderLibraryLoader(Location.FromPath("D:\\lib"), fileLoaderMock.Object);

            libLoader.LoadPluginFiles("A", null);

            Assert.AreEqual("D:\\lib\\_plugins\\A", loc.ToPath());
        }