public void NonExpressionShouldProduceNoViolations(string displayName, SyntaxBase expression)
        {
            var diagnosticWriter = ToListDiagnosticWriter.Create();

            TypeValidator.GetCompileTimeConstantViolation(expression, diagnosticWriter);

            diagnosticWriter.GetDiagnostics().Should().BeEmpty();
        }
        public void NonLiteralExpression_IsLiteralExpression_ShouldReturnViolations(string displayName, SyntaxBase expression)
        {
            var diagnosticWriter = ToListDiagnosticWriter.Create();

            TypeValidator.GetCompileTimeConstantViolation(expression, diagnosticWriter);

            diagnosticWriter.GetDiagnostics().Should().NotBeEmpty();
        }
Esempio n. 3
0
 public void NonExpressionShouldProduceNoViolations(string displayName, SyntaxBase expression)
 {
     TypeValidator.GetCompileTimeConstantViolation(expression).Should().BeEmpty();
 }
Esempio n. 4
0
 public void NonLiteralExpression_IsLiteralExpression_ShouldReturnViolations(string displayName, SyntaxBase expression)
 {
     TypeValidator.GetCompileTimeConstantViolation(expression).Should().NotBeEmpty();
 }