public void ProjectConfiguration_WhenInvalidXml_ThrowException() { var options = TestHelper.CreateOptions($@"ResourceTests\SonarProjectConfig\Invalid_Xml\SonarProjectConfig.xml"); var sut = new SonarAnalysisContext(new DummyContext(), Enumerable.Empty <DiagnosticDescriptor>()); sut.Invoking(x => x.ProjectConfiguration(options)).Should().Throw <InvalidOperationException>() .WithMessage("File SonarProjectConfig.xml has been added as an AdditionalFile but could not be read and parsed."); }