public void RubyLibraryPathTrimsPath() { Properties p = new Properties(); RubyAddInOptions options = new RubyAddInOptions(p); options.RubyLibraryPath = " "; Assert.AreEqual(String.Empty, options.RubyLibraryPath); }
public void HasRubyLibraryPathReturnsFalseForEmptyPath() { Properties p = new Properties(); RubyAddInOptions options = new RubyAddInOptions(p); options.RubyLibraryPath = String.Empty; Assert.IsFalse(options.HasRubyLibraryPath); }
public void HasRubyLibraryPathReturnsTrueForNonEmptyPath() { Properties p = new Properties(); RubyAddInOptions options = new RubyAddInOptions(p); options.RubyLibraryPath = @"c:\ruby\lib"; Assert.IsTrue(options.HasRubyLibraryPath); }
public void RubyLibraryPathTakenFromProperties() { Properties p = new Properties(); RubyAddInOptions options = new RubyAddInOptions(p); string expectedRubyLibraryPath = @"c:\ruby\lib;c:\ruby\lib\lib-tk"; p["RubyLibraryPath"] = expectedRubyLibraryPath; Assert.AreEqual(expectedRubyLibraryPath, options.RubyLibraryPath); }
public void SetRubyConsoleFileName() { Properties p = new Properties(); RubyAddInOptions options = new RubyAddInOptions(p); string fileName = @"C:\IronRuby\ir.exe"; options.RubyFileName = fileName; Assert.AreEqual(fileName, options.RubyFileName); Assert.AreEqual(fileName, p["RubyFileName"]); }
public void SetUp() { properties = new Properties(); options = new RubyAddInOptions(properties); options.RubyFileName = @"C:\Ruby\ir.exe"; options.RubyLibraryPath = @"C:\Ruby\lib"; optionsPanel = new RubyOptionsPanel(options); optionsPanel.LoadPanelContents(); fileNameTextBox = (TextBox)optionsPanel.ControlDictionary["rubyFileNameTextBox"]; rubyLibraryPathTextBox = (TextBox)optionsPanel.ControlDictionary["rubyLibraryPathTextBox"]; }
void CreateTestDebugger() { debuggerService = new MockDebuggerService(); debugger = debuggerService.MockDebugger; messageService = new MockMessageService(); testResultsMonitor = new MockTestResultsMonitor(); testResultsMonitor.InitialFilePosition = 3; options = new RubyAddInOptions(new Properties()); options.RubyFileName = @"c:\ironruby\ir.exe"; fileService = new MockScriptingFileService(); testDebugger = new RubyTestDebugger(debuggerService, messageService, testResultsMonitor, options, fileService); }
public void Init() { MockWorkbench workbench = MockWorkbench.CreateWorkbenchWithOneViewContent(@"C:\Projects\test.rb"); Properties p = new Properties(); RubyAddInOptions options = new RubyAddInOptions(p); options.RubyFileName = @"C:\IronRuby\ir.exe"; debugger = new MockDebugger(); command = new RunRubyCommand(workbench, options, debugger); command.Run(); }
void CreateTestRunner() { processRunner = new MockProcessRunner(); testResultsMonitor = new MockTestResultsMonitor(); testResultsMonitor.InitialFilePosition = 3; options = new RubyAddInOptions(new Properties()); options.RubyFileName = @"c:\ironruby\ir.exe"; fileService = new MockScriptingFileService(); MockMessageService messageService = new MockMessageService(); RubyTestRunnerContext context = new RubyTestRunnerContext(processRunner, testResultsMonitor, options, fileService, messageService); testRunner = new RubyTestRunner(context); }
public void Init() { string tempFileName = "temp.tmp"; MockScriptingFileService fileService = new MockScriptingFileService(); fileService.SetTempFileName(tempFileName); fileService.SetTextWriter(new StringWriter()); Properties properties = new Properties(); options = new RubyAddInOptions(properties); AddInPathHelper helper = new AddInPathHelper("RubyBinding"); AddIn addin = helper.CreateDummyAddInInsideAddInTree(); addin.FileName = @"c:\rubybinding\rubybinding.addin"; string testResultsFileName = "results.txt"; testRunner = new RubyTestRunnerApplication(testResultsFileName, options, fileService); }
public void SetUpFixture() { // Create dummy view content with the Ruby script. MockViewContent viewContent = new MockViewContent(); viewContent.PrimaryFileName = @"C:\Projects\test.rb"; MockWorkbenchWindow workbenchWindow = new MockWorkbenchWindow(); workbenchWindow.ActiveViewContent = viewContent; MockWorkbench workbench = new MockWorkbench(); workbench.ActiveWorkbenchWindow = workbenchWindow; // Create the Ruby binding addin options. Properties p = new Properties(); RubyAddInOptions options = new RubyAddInOptions(p); options.RubyFileName = @"C:\IronRuby\ir.exe"; debugger = new MockDebugger(); command = new RunDebugRubyCommand(workbench, options, debugger); command.Run(); }
public void Init() { options = new RubyAddInOptions(new Properties()); options.RubyFileName = @"C:\IronRuby\ir.exe"; app = new RubyConsoleApplication(options); }