Exemplo n.º 1
0
        public AndConstraint <ErrorBuilderAssertions> HaveMessage(string message, string because = "", params object[] becauseArgs)
        {
            ErrorDiagnostic error = GetErrorFromSubject();

            using (new AssertionScope())
            {
                error.Should().HaveMessage(message, because, becauseArgs);
            }

            return(new(this));
        }
Exemplo n.º 2
0
        public AndConstraint <ErrorBuilderAssertions> HaveCode(string code, string because = "", params object[] becauseArgs)
        {
            ErrorDiagnostic error = GetErrorFromSubject();

            using (new AssertionScope())
            {
                error.Should().HaveCodeAndSeverity(code, DiagnosticLevel.Error, because, becauseArgs);
            }

            return(new(this));
        }
Exemplo n.º 3
0
 public UnassignableSymbol(ErrorDiagnostic error) : base(error.Code)
 {
     this.error = error;
 }
Exemplo n.º 4
0
 public static ErrorType Create(ErrorDiagnostic error)
 => Create(error.AsEnumerable());
Exemplo n.º 5
0
 public ErrorSymbol(ErrorDiagnostic error) : base(error.Code)
 {
     this.error = error;
 }
Exemplo n.º 6
0
 public static UnassignableTypeSymbol CreateErrors(ErrorDiagnostic error)
 {
     return(new UnassignableTypeSymbol(ErrorTypeName, TypeKind.Error, ImmutableArray.Create <ErrorDiagnostic>(error)));
 }
Exemplo n.º 7
0
 public ErrorDiagnosticException(ErrorDiagnostic error) :
     base(error.ToString())
 {
     this.Error = error;
 }
Exemplo n.º 8
0
 public ErrorDiagnosticException(ErrorDiagnostic error, Exception innerException) :
     base(error.ToString(), innerException)
 {
     this.Error = error;
 }
Exemplo n.º 9
0
 public ErrorTypeSymbol(ErrorDiagnostic error)
     : base(ErrorTypeName)
 {
     this.errors = ImmutableArray.Create <ErrorDiagnostic>(error);
 }