Class TestCompilationAssertions
Inheritance
TestCompilationAssertions
Assembly: Neon.Roslyn.Xunit.dll
Syntax
public class TestCompilationAssertions : ReferenceTypeAssertions<TestCompilation, TestCompilationAssertions>
Constructors
TestCompilationAssertions(TestCompilation)
Declaration
public TestCompilationAssertions(TestCompilation compilation)
Parameters
Properties
Identifier
Returns the type of the subject the assertion applies on.
It should be a user-friendly name as it is included in the failure message.
Declaration
protected override string Identifier { get; }
Property Value
Overrides
Methods
ContainSource(string, string, params object[])
Asserts that the TestCompilation contains the specified source.
Declaration
public AndConstraint<TestCompilationAssertions> ContainSource(string source, string because = "", params object[] becauseArgs)
Parameters
Returns
HaveDiagnostic(Diagnostic, string, params object[])
Assedrts that a diagnostic is present in the TestCompilation.
Declaration
public AndConstraint<TestCompilationAssertions> HaveDiagnostic(Diagnostic diagnostic, string because = "", params object[] becauseArgs)
Parameters
Returns
HaveDiagnostic(string, string, params object[])
Asserts that a Diagnostic with the given Id is present in the TestCompilation.
Declaration
public AndConstraint<TestCompilationAssertions> HaveDiagnostic(string id, string because = "", params object[] becauseArgs)
Parameters
Returns
HaveDiagnostics(string[], string, params object[])
Asserts that a Diagnostic with the given Ids are present in the TestCompilation.
Declaration
public AndConstraint<TestCompilationAssertions> HaveDiagnostics(string[] ids, string because = "", params object[] becauseArgs)
Parameters
Returns
NotContainSource(string, string, params object[])
Asserts that the TestCompilation does not contain the specified source.
Declaration
public AndConstraint<TestCompilationAssertions> NotContainSource(string source, string because = "", params object[] becauseArgs)
Parameters
Returns