public void IsParenthesisAdded() { var myEditor = new LeekBox(); LeekIDE.Autocompletion.Syntaxic.Symbols.AutoCompleteBrackets(myEditor, '('); Assert.AreEqual(myEditor.Text, ")"); }
public void IsCurlyBracketAdded() { // this tests if the curly bracket is added :) var myEditor = new LeekBox(); LeekIDE.Autocompletion.Syntaxic.Symbols.AutoCompleteBrackets(myEditor, '{'); Assert.IsTrue(myEditor.Text.EndsWith("}")); }
public void IsQuoteAdded() { // this tests if quote is added WITHOUT looping var myEditor = new LeekBox(); // LeekIDE.Autocompletion.Syntaxic.Symbols.AutoCompleteBrackets(myEditor, '"'); myEditor.TextArea.PerformTextInput("\""); Task.Run(async() => { await Task.Delay(1500); Assert.Fail("timeout :'("); }); Assert.AreEqual(myEditor.Text, "\"\""); }
private async void CommandBinding_Executed_OpenAsync(object sender, ExecutedRoutedEventArgs e) { var dialog = new OpenFileDialog { Filter = "LeekScript Files (*.leek)|*.leek|All files (*.*)|*.*" }; if (dialog.ShowDialog() ?? false) { var item = await LeekBox.CreateBoxFromFileAsync(dialog.FileName); var index = Tab.Items.Add(new TabItem { Header = dialog.SafeFileName, Content = item, Style = Resources["tab"] as Style }); } }