コード例 #1
0
        public void RubyLibraryPathTrimsPath()
        {
            Properties       p       = new Properties();
            RubyAddInOptions options = new RubyAddInOptions(p);

            options.RubyLibraryPath = "    ";
            Assert.AreEqual(String.Empty, options.RubyLibraryPath);
        }
コード例 #2
0
        public void HasRubyLibraryPathReturnsFalseForEmptyPath()
        {
            Properties       p       = new Properties();
            RubyAddInOptions options = new RubyAddInOptions(p);

            options.RubyLibraryPath = String.Empty;
            Assert.IsFalse(options.HasRubyLibraryPath);
        }
コード例 #3
0
        public void HasRubyLibraryPathReturnsTrueForNonEmptyPath()
        {
            Properties       p       = new Properties();
            RubyAddInOptions options = new RubyAddInOptions(p);

            options.RubyLibraryPath = @"c:\ruby\lib";
            Assert.IsTrue(options.HasRubyLibraryPath);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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"]);
        }
コード例 #6
0
 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"];
 }
コード例 #7
0
 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);
 }
コード例 #8
0
        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);
        }
コード例 #10
0
        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);
        }
コード例 #11
0
        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();
        }
コード例 #12
0
 public void Init()
 {
     options = new RubyAddInOptions(new Properties());
     options.RubyFileName = @"C:\IronRuby\ir.exe";
     app = new RubyConsoleApplication(options);
 }