public void ShouldFailForNoTags()
        {
            // Given
            var xmlConfig = XElement.Parse(
                @"<Exception>" +
                "</Exception>");

            // When
            var action = new Assert.ThrowsDelegate(() => PackageProjectException.Parse(xmlConfig));

            // Then
            Assert.Throws <ArgumentException>(action);
        }
        public void ShouldUseProjectNameForParsing(string configuredProjectName, string actualProjectName, bool expectedIsMatched)
        {
            // Given
            var xmlConfig = XElement.Parse(
                @"<Exception>" +
                $"<Project>{configuredProjectName}</Project>" +
                "</Exception>");

            // When
            var exception = PackageProjectException.Parse(xmlConfig);

            // Then
            exception.Matches(null, actualProjectName).ShouldBe(expectedIsMatched);
        }
        public void ShouldIgnorePackageIfItIsNotConfigured(string packageName, string projectName, bool expectedIsMatched)
        {
            // Given
            var xmlConfig = XElement.Parse(
                @"<Exception>" +
                $"<Project>{ConfiguredProject}</Project>" +
                "</Exception>");

            // When
            var exception = PackageProjectException.Parse(xmlConfig);

            // Then
            exception.Matches(packageName, projectName).ShouldBe(expectedIsMatched);
        }
        public void ShouldFailIncorrectParentTag()
        {
            // Given
            var xmlConfig = XElement.Parse(
                @"<IncorrentParentTag>" +
                $"<Project>123</Project>" +
                "</IncorrentParentTag>");

            // When
            var action = new Assert.ThrowsDelegate(() => PackageProjectException.Parse(xmlConfig));

            // Then
            Assert.Throws <ArgumentException>(action);
        }