public void InstantiationOfNestedGenericTypeThatReferencesReactElementWillFail()
{
var testContent = @"
using System.Collections.Generic;
using Bridge.React;
namespace TestCase
{
public class Example
{
public void Go()
{
var x = new List<KeyValuePair<string, ReactElement>>();
}
}
}";
var expected = new DiagnosticResult
{
Id = ReactElementAnalyser.DiagnosticId,
Message = ReactElementAnalyser.InstantiationsThatReferToTypesNotAvailableAtRuntimeRule.MessageFormat.ToString(),
Severity = DiagnosticSeverity.Error,
Locations = new[]
{
new DiagnosticResultLocation("Test0.cs", 11, 46)
}
};
VerifyCSharpDiagnostic(testContent, expected);
}