Bridge.React.Analyser.Test.DynamicChildrenUniqueIdWorkaroundTests.PassingArrayReturnedFromPropertyToParamsArgumentShouldResultInWarning C# (CSharp) Метод

PassingArrayReturnedFromPropertyToParamsArgumentShouldResultInWarning() приватный Метод

		public void PassingArrayReturnedFromPropertyToParamsArgumentShouldResultInWarning()
		{
			var testContent = @"
				using Bridge;
				using Bridge.React;

				namespace TestCase
				{
					public class Example
					{
						public ReactElement Get()
						{
							return DOM.Div(null, Children);
						}

						private Union<ReactElement, string>[] Children
						{
							get
							{
								return null; // It's not important what this method returns, only that its return type is Union<ReactElement, string>[]
							}
						}
					}
				}";

			var expected = new DiagnosticResult
			{
				Id = DynamicChildrenUniqueIdWorkaroundAnalyser.DiagnosticId,
				Message = string.Format(DynamicChildrenUniqueIdWorkaroundAnalyser.DynamicChildrenUniqueIdWarningBypassRule.MessageFormat.ToString(), "Div"),
				Severity = DiagnosticSeverity.Warning,
				Locations = new[]
				{
					new DiagnosticResultLocation("Test0.cs", 11, 29)
				}
			};

			VerifyCSharpDiagnostic(testContent, expected);
		}