3rdparty/NRefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CodeCompletionBugTests.cs
/// <summary>
/// Bug 538208 - Go to declaration not working over a generic method...
/// </summary>
Bug 538208 - Go to declaration not working over a generic method
Bug 538208 - Go to declaration not working over a generic method
[Test]
		public void TestBug538208 ()
		{
			CompletionDataList provider = CreateCtrlSpaceProvider (
@"
class MyClass
{
	public string Test { get; set; }
	T foo<T>(T arg)
	{
		return arg;
	}
	public void Main(string[] args)
	{
		var myObject = foo<MyClass>(new MyClass());
		$myObject.$
	}
}
");
			Assert.IsNotNull (provider, "provider not found.");
			Assert.IsNotNull (provider.Find ("Test"), "property 'Test' not found.");
			provider = CreateCtrlSpaceProvider (
@"
class MyClass2
{
	public string Test { get; set; }
	T foo<T>(T arg)
	{
		return arg;
	}
	public void Main(string[] args)
	{
		var myObject = this.foo<MyClass2>(new MyClass2());
		$myObject.$
	}
}
");
			Assert.IsNotNull (provider, "provider not found.");
			Assert.IsNotNull (provider.Find ("Test"), "property 'Test' not found.");
		}
[ Test ] public void TestBug538208 ( ) { CompletionDataList provider = CreateCtrlSpaceProvider ( @"
class MyClass
{
	public string Test { get; set; }
	
	T foo<T>(T arg)
	{
		return arg;
	}

	public void Main(string[] args)
	{
		var myObject = foo<MyClass>(new MyClass());
		$myObject.$
	}
}
" ) ; Assert . IsNotNull ( provider , " " ) ; Assert . IsNotNull ( provider . Find ( " " ) , " " ) ; provider = CreateCtrlSpaceProvider ( @"
class MyClass2
{
	public string Test { get; set; }
	
	T foo<T>(T arg)
	{
		return arg;
	}

	public void Main(string[] args)
	{
		var myObject = this.foo<MyClass2>(new MyClass2());
		$myObject.$
	}
}
" ) ; Assert . IsNotNull ( provider , " " ) ; Assert . IsNotNull ( provider . Find ( " " ) , " " ) ; }
Bug 538208 - Go to declaration not working over a generic method...
Bug 538208 - Go to declaration not working over a generic method ...
// We've to test 2 expressions for this bug. Since there are 2 ways of accessing // members. // First: the identifier expression // now the member reference expression 