3rdparty/NRefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CodeCompletionBugTests.cs
/// <summary>
/// Bug 322089 - Code completion for indexer
/// </summary>
Bug 322089 - Code completion for indexer
Bug 322089 - Code completion for indexer
[Test]
		public void TestBug322089 ()
		{
			CompletionDataList provider = CreateProvider (
@"class AClass
{
	public int AField;
	public int BField;
}
class Test
{
	public void TestMethod ()
	{
		AClass[] list = new AClass[0];
		$list[0].$
	}
}");
			Assert.IsNotNull (provider, "provider not found.");
			for (int i = 0; i < provider.Count; i++) {
				var varname = provider [i];
				Console.WriteLine (varname.CompletionText);
			}
			Assert.AreEqual (6, provider.Count);
			CodeCompletionBugTests.CheckObjectMembers (provider); 
			Assert.IsNotNull (provider.Find ("AField"), "field 'AField' not found.");
			Assert.IsNotNull (provider.Find ("BField"), "field 'BField' not found.");
		}
[ Test ] public void TestBug322089 ( ) { CompletionDataList provider = CreateProvider ( @"class AClass
{
	public int AField;
	public int BField;
}

class Test
{
	public void TestMethod ()
	{
		AClass[] list = new AClass[0];
		$list[0].$
	}
}" ) ; Assert . IsNotNull ( provider , " " ) ; for ( int i = 0 ; i < provider . Count ; i ++ ) { var varname = provider [ i ] ; Console . WriteLine ( varname . CompletionText ) ; } Assert . AreEqual ( 6 , provider . Count ) ; CodeCompletionBugTests . CheckObjectMembers ( provider ) ; Assert . IsNotNull ( provider . Find ( " " ) , " " ) ; Assert . IsNotNull ( provider . Find ( " " ) , " " ) ; }
Bug 322089 - Code completion for indexer
Bug 322089 - Code completion for indexer
// 4 from System.Object