Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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());
        }