Esempio n. 1
0
		public void TestFunctionOverloadsToolTipNotShowForNonSchemaFunctions()
		{
			const string query = "SELECT MAX(DUMMY) FROM DUAL";
			_documentRepository.UpdateStatements(query);

			var functionOverloads = _codeCompletionProvider.ResolveProgramOverloads(_documentRepository, 9);
			var toolTip = new ProgramOverloadList { FunctionOverloads = functionOverloads };
			toolTip.ViewOverloads.Items.Count.ShouldBe(0);
		}
Esempio n. 2
0
		public void TestFunctionOverloadWithFunctionReturningCollection()
		{
			const string query = "SELECT DBMS_XPLAN.DISPLAY_CURSOR() FROM DUAL";
			_documentRepository.UpdateStatements(query);

			var functionOverloads = _codeCompletionProvider.ResolveProgramOverloads(_documentRepository, 33);
			var functionOverloadList = new ProgramOverloadList { FunctionOverloads = functionOverloads };
			functionOverloadList.ViewOverloads.Items.Count.ShouldBe(1);
			functionOverloadList.ViewOverloads.Items[0].ShouldBeAssignableTo(typeof(TextBlock));

			var itemText = GetTextFromTextBlock((TextBlock)functionOverloadList.ViewOverloads.Items[0]);
			itemText.ShouldBe("SYS.DBMS_XPLAN.DISPLAY_CURSOR([SQL_ID: VARCHAR2], [CURSOR_CHILD_NUMBER: NUMBER], [FORMAT: VARCHAR2]) RETURN: SYS.DBMS_XPLAN_TYPE_TABLE");
		}
Esempio n. 3
0
		public void TestObjectTypeConstructorToolTip()
		{
			const string query = "SELECT SYS.ODCIARGDESC() FROM DUAL";
			_documentRepository.UpdateStatements(query);

			var functionOverloads = _codeCompletionProvider.ResolveProgramOverloads(_documentRepository, 23);
			var functionOverloadList = new ProgramOverloadList { FunctionOverloads = functionOverloads };
			functionOverloadList.ViewOverloads.Items.Count.ShouldBe(1);
			functionOverloadList.ViewOverloads.Items[0].ShouldBeAssignableTo(typeof(TextBlock));

			var itemText = GetTextFromTextBlock((TextBlock)functionOverloadList.ViewOverloads.Items[0]);
			itemText.ShouldBe("SYS.ODCIARGDESC(ARGTYPE: NUMBER, TABLENAME: VARCHAR2, TABLESCHEMA: VARCHAR2, COLNAME: VARCHAR2, TABLEPARTITIONLOWER: VARCHAR2, TABLEPARTITIONUPPER: VARCHAR2, CARDINALITY: NUMBER) RETURN: SYS.ODCIARGDESC");
		}
Esempio n. 4
0
		public void TestPrimitiveTypeCollectionTypeConstructorToolTip()
		{
			const string query = "SELECT SYS.ODCIRAWLIST() FROM DUAL";
			_documentRepository.UpdateStatements(query);

			var functionOverloads = _codeCompletionProvider.ResolveProgramOverloads(_documentRepository, 23);
			var functionOverloadList = new ProgramOverloadList { FunctionOverloads = functionOverloads };
			functionOverloadList.ViewOverloads.Items.Count.ShouldBe(1);
			functionOverloadList.ViewOverloads.Items[0].ShouldBeAssignableTo(typeof(TextBlock));

			var itemText = GetTextFromTextBlock((TextBlock)functionOverloadList.ViewOverloads.Items[0]);
			itemText.ShouldBe("SYS.ODCIRAWLIST([array of RAW]) RETURN: SYS.ODCIRAWLIST");
		}
Esempio n. 5
0
		public void TestFunctionOverloadsToolTip()
		{
			const string query = "SELECT SQLPAD.SQLPAD_FUNCTION() FROM DUAL";
			_documentRepository.UpdateStatements(query);

			var functionOverloads = _codeCompletionProvider.ResolveProgramOverloads(_documentRepository, 30);
			var functionOverloadList = new ProgramOverloadList { FunctionOverloads = functionOverloads };
			functionOverloadList.ViewOverloads.Items.Count.ShouldBe(1);
			functionOverloadList.ViewOverloads.Items[0].ShouldBeAssignableTo(typeof(TextBlock));

			var itemText = GetTextFromTextBlock((TextBlock)functionOverloadList.ViewOverloads.Items[0]);
			itemText.ShouldBe("HUSQVIK.SQLPAD.SQLPAD_FUNCTION(P: NUMBER) RETURN: NUMBER");
		}