3rdparty/NRefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CodeCompletionBugTests.cs
/// <summary>
/// Bug 323283 - Code completion for indexers offered by generic types (generics)
/// </summary>
Bug 323283 - Code completion for indexers offered by generic types (generics)
Bug 323283 - Code completion for indexers offered by generic types ( generics )
[Test]
		public void TestBug323283 ()
		{
			CompletionDataList provider = CreateProvider (
@"class AClass
{
	public int AField;
	public int BField;
}
class MyClass<T>
{
	public T this[int i] {
		get {
			return default (T);
		}
	}
}
class Test
{
	public void TestMethod ()
	{
		MyClass<AClass> list = new MyClass<AClass> ();
		$list[0].$
	}
}");
			Assert.IsNotNull (provider, "provider not found.");
			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 TestBug323283 ( ) { CompletionDataList provider = CreateProvider ( @"class AClass
{
	public int AField;
	public int BField;
}

class MyClass<T>
{
	public T this[int i] {
		get {
			return default (T);
		}
	}
}

class Test
{
	public void TestMethod ()
	{
		MyClass<AClass> list = new MyClass<AClass> ();
		$list[0].$
	}
}" ) ; Assert . IsNotNull ( provider , " " ) ; Assert . AreEqual ( 6 , provider . Count ) ; CodeCompletionBugTests . CheckObjectMembers ( provider ) ; Assert . IsNotNull ( provider . Find ( " " ) , " " ) ; Assert . IsNotNull ( provider . Find ( " " ) , " " ) ; }
Bug 323283 - Code completion for indexers offered by generic types (generics)
Bug 323283 - Code completion for indexers offered by generic types ( generics )
// 4 from System.Object