public void CompressSearchIndex_Test(string indexFile) { indexFile = ProgramAssemblyUtility.GetPathFromAssembly(this.GetType().Assembly, indexFile); var indexFileInfo = new FileInfo(indexFile); Assert.True(indexFileInfo.Exists); var compressedIndexFileInfo = SearchIndexActivity.CompressSearchIndex(indexFileInfo); Assert.True(compressedIndexFileInfo?.Exists); }
public void GenerateSearchIndexFrom11tyEntries_Test(string entryRoot, string indexRoot, string indexFileName) { entryRoot = ProgramAssemblyUtility.GetPathFromAssembly(this.GetType().Assembly, entryRoot); indexRoot = ProgramAssemblyUtility.GetPathFromAssembly(this.GetType().Assembly, indexRoot); var entryRootInfo = new DirectoryInfo(entryRoot); Assert.True(entryRootInfo.Exists); var indexRootInfo = new DirectoryInfo(indexRoot); Assert.True(indexRootInfo.Exists); var indices = SearchIndexActivity.GenerateSearchIndexFrom11tyEntries(entryRootInfo, indexRootInfo, indexFileName); Assert.True(indices?.Any()); }