public void SetUp()
		{
			this.Viewer = new CodeViewer();
			this.Viewer.Language = PredefinedLanguage.MsSql;

			var oTestProvider = new TestDbInfoProvider();
			var oSuggestionBuilder = new EditQueryRegExBuilder(Viewer, oTestProvider);
			oSuggestionBuilder.DefaultSchema = "Schema_Second";

			Viewer.UseSuggestionRules(oSuggestionBuilder);
		}
Beispiel #2
0
		public void Linking()
		{
			CodeViewer oViewer = new CodeViewer();
			Assert.IsNull(oViewer.CodeCompletor);
			
			oViewer.ReadOnly = false;
			Assert.IsNull(oViewer.CodeCompletor);

			TestDbInfoProvider oTestProvider = new TestDbInfoProvider();
			var oSuggestionBuilder = new EditQueryRegExBuilder(oViewer, oTestProvider);

			oViewer.UseSuggestionRules(oSuggestionBuilder);

			Assert.IsNotNull(oViewer.CodeCompletor);
			Assert.IsNotNull(oViewer.CodeCompletor.Builder);
			Assert.AreEqual(oSuggestionBuilder, oViewer.CodeCompletor.Builder);
		}