public void ShouldRemoveAllAliases(string documentPath) { // Arrange IEnumerable <string> actualAliasNames; // Act using (var document = new OpenXmlDocument(documentPath)) { actualAliasNames = document.GetAliasNames(); document.SearchAndRemoveAliases(actualAliasNames); actualAliasNames = document.GetAliasNames(); } // Assert Assert.Empty(actualAliasNames); }
public void ShouldGetAliasNamesFromFilePath(string documentPath, int aliasNumber) { // Arrange IEnumerable <string> actualAliasNames; // Act using (var document = new OpenXmlDocument(documentPath)) { actualAliasNames = document.GetAliasNames(); } // Assert Assert.NotNull(actualAliasNames); Assert.Equal(aliasNumber, actualAliasNames.Count()); }