Esempio n. 1
0
		public RubyTestRunner(RubyTestRunnerContext context)
			: base(context)
		{
			this.options = context.Options;
			this.fileService = context.ScriptingFileService;
			context.TestResultsMonitor.InitialFilePosition = 0;
		}
		public void HasRubyLibraryPathReturnsTrueForNonEmptyPath()
		{
			Properties p = new Properties();
			RubyAddInOptions options = new RubyAddInOptions(p);
			options.RubyLibraryPath = @"c:\ruby\lib";
			Assert.IsTrue(options.HasRubyLibraryPath);
		}
Esempio n. 3
0
 public RubyTestRunner(RubyTestRunnerContext context)
     : base(context)
 {
     this.options     = context.Options;
     this.fileService = context.ScriptingFileService;
     context.TestResultsMonitor.InitialFilePosition = 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);
		}
		public RubyTestRunnerApplication(string testResultsFileName,
			RubyAddInOptions options,
			IScriptingFileService fileService)
		{
			this.testResultsFileName = testResultsFileName;
			this.options = options;
			this.fileService = fileService;
			consoleApplication = new RubyConsoleApplication(options);
		}
 public RubyTestRunnerApplication(string testResultsFileName,
                                  RubyAddInOptions options,
                                  IScriptingFileService fileService)
 {
     this.testResultsFileName = testResultsFileName;
     this.options             = options;
     this.fileService         = fileService;
     consoleApplication       = new RubyConsoleApplication(options);
 }
 public RubyTestRunnerContext(IUnitTestProcessRunner processRunner,
                              ITestResultsMonitor testResultsMonitor,
                              RubyAddInOptions options,
                              IScriptingFileService fileService,
                              IUnitTestMessageService messageService)
     : base(processRunner, testResultsMonitor, fileService, messageService)
 {
     this.options     = options;
     this.fileService = fileService;
 }
		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 RubyTestRunnerContext(IUnitTestProcessRunner processRunner,
			ITestResultsMonitor testResultsMonitor,
			RubyAddInOptions options,
			IScriptingFileService fileService,
			IUnitTestMessageService messageService)
			: base(processRunner, testResultsMonitor, fileService, messageService)
		{
			this.options = options;
			this.fileService = fileService;
		}
Esempio n. 10
0
		public RubyTestDebugger(IUnitTestDebuggerService debuggerService,
			IUnitTestMessageService messageService,
			ITestResultsMonitor testResultsMonitor,
			RubyAddInOptions options,
			IScriptingFileService fileService)
			: base(debuggerService, messageService, testResultsMonitor)
		{
			this.options = options;
			this.fileService = fileService;
			testResultsMonitor.InitialFilePosition = 0;
		}
Esempio n. 11
0
 public RubyTestDebugger(IUnitTestDebuggerService debuggerService,
                         IUnitTestMessageService messageService,
                         ITestResultsMonitor testResultsMonitor,
                         RubyAddInOptions options,
                         IScriptingFileService fileService)
     : base(debuggerService, messageService, testResultsMonitor)
 {
     this.options     = options;
     this.fileService = fileService;
     testResultsMonitor.InitialFilePosition = 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"];
		}
		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);
		}
Esempio n. 14
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);
		}
		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 HasRubyLibraryPathReturnsFalseForEmptyPath()
		{
			Properties p = new Properties();
			RubyAddInOptions options = new RubyAddInOptions(p);
			options.RubyLibraryPath = String.Empty;
			Assert.IsFalse(options.HasRubyLibraryPath);
		}
Esempio n. 18
0
 public RunRubyCommand(IWorkbench workbench, RubyAddInOptions options, IDebugger debugger)
 {
     this.workbench = workbench;
     this.debugger  = debugger;
     this.options   = options;
 }
		public void RubyLibraryPathTrimsPath()
		{
			Properties p = new Properties();
			RubyAddInOptions options = new RubyAddInOptions(p);
			options.RubyLibraryPath = "    ";
			Assert.AreEqual(String.Empty, options.RubyLibraryPath);
		}		
Esempio n. 20
0
		public RunDebugRubyCommand(IScriptingWorkbench workbench, RubyAddInOptions options, IDebugger debugger) 
			: base(workbench, options, debugger)
		{
			Debug = true;
		}
 public RubyConsoleApplication(RubyAddInOptions options)
 {
     this.options = options;
 }
		public RubyConsoleApplication(RubyAddInOptions options)
		{
			this.options = options;
		}
Esempio n. 23
0
		public RubyOptionsPanel(RubyAddInOptions options)
		{
			this.options = options;
		}
 public RubyOptionsPanel(RubyAddInOptions options)
 {
     this.options = options;
 }
Esempio n. 25
0
		public RunRubyCommand(IScriptingWorkbench workbench, RubyAddInOptions options, IDebugger debugger)
			: base(workbench, debugger, new RubyConsoleApplication(options))
		{
		}
Esempio n. 26
0
 public RunRubyCommand(IScriptingWorkbench workbench, RubyAddInOptions options, IDebugger debugger)
     : base(workbench, debugger, new RubyConsoleApplication(options))
 {
 }
Esempio n. 27
0
 public RunDebugRubyCommand(IWorkbench workbench, RubyAddInOptions options, IDebugger debugger)
     : base(workbench, options, debugger)
 {
     Debug = true;
 }
		public void Init()
		{
			options = new RubyAddInOptions(new Properties());
			options.RubyFileName = @"C:\IronRuby\ir.exe";
			app = new RubyConsoleApplication(options);
		}
Esempio n. 29
0
		public RunRubyCommand(IScriptingWorkbench workbench, RubyAddInOptions options, IDebugger debugger)
		{
			this.workbench = workbench;
			this.debugger = debugger;
			this.options = options;
		}